-
August 24th, 2005, 04:15 AM
#1
Excel, VBA and save problems
I have a little automated Excel program that pulls info from the company database, fills out forms and then saves the forms you want to a shared drive. At the same time, it updates the control log with the file details and a hyperlink to the file.
I'm having a little problem with the saving though. I tested the program using my userID and can save to my machine (not much use in the end) and also to a shared folder I have full access to. The user that is using my program cannot, however, save to the shared folder he needs to save to. He has full permissions on the folder according to one of the on-site IT people. He can also manually put a file in the folder, but that's useless in this case as the hyperlink becomes invalid. Any ideas?
Another colleague of mine had a similar issue with some of his programs which he managed to resolve by just having the folder open before he executed the save event in Excel, however I cannot use this solution with my program. Besides, it's a bit awkward.
Any help would be most appreciated. Thanks!
-
August 24th, 2005, 07:24 AM
#2
Driver Terrier
Is your proggie running as system rather than the user?
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
August 24th, 2005, 08:16 AM
#3
Originally Posted by NooNoo
Is your proggie running as system rather than the user?
Good question. I don't know! I suspect it's running as System however. How would I find out exactly (Win2kPro)? I couldn't find an option to find out in Task Manager or anything. How would I work around it if the program is running as System?
The thing I've made is just an advanced Excel workbook, so the running process is Excel.
-
August 24th, 2005, 09:06 AM
#4
Registered User
Protected by Glock. Don't mess with me!
-
August 24th, 2005, 09:14 AM
#5
Not a sausage. As far as I can see, it pretends to save and then doesn't really.
There was an error earlier today but it was due to an issue with the company database and not Excel. Unfortunately, company rules prevent me from posting the error message as it contains internal information.
-
August 25th, 2005, 02:58 AM
#6
Driver Terrier
Originally Posted by ringo2143z
Good question. I don't know! I suspect it's running as System however. How would I find out exactly (Win2kPro)? I couldn't find an option to find out in Task Manager or anything. How would I work around it if the program is running as System?
The thing I've made is just an advanced Excel workbook, so the running process is Excel.
The process should show up in task manager, along with it's owner. If you haven't got the owners listed view>>select columns should allow you to do it.
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
August 25th, 2005, 03:22 AM
#7
The only option in there which mentions "user" is USER Objects and the data it provides is no where near what I need. I would assume that the admins have disabled the option so you can't find out if they're checking your PC. I have registry access if there's a way to find it in there...
-
August 26th, 2005, 06:51 AM
#8
Driver Terrier
So your vba does not show up as a process?
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
August 26th, 2005, 06:57 AM
#9
Originally Posted by NooNoo
So your vba does not show up as a process?
Nope. Since VBA is what you use to write macros, I wouldn't expect it to. All I would expect to see is 2 instances of Excel (one for the main window and one for the VBA editor), which I do. I just can't see who/what it's running under.
Spoke to main IT boy about the problem, and he reckons it's something to do with a lost mapping to the drive or a lack of space. However, the drive is mapped and the drive still has 80gb free. The user permissions aren't an issue as they have full control. Apparently there are other programs onsite that work fine, but I don't know who, what or how.
-
August 28th, 2005, 05:03 AM
#10
Driver Terrier
oooh, it's part of excel...hmmmm
I assume his security allows him to run macros? Set to medium or low?
And as dumb as this sounds... have you tried editing the vba while logged in as him? Could it be that because he didn't write it, the security features are having a fit?
what is the command line you are using to save? Is it a mapped drive or a unc?
Last edited by NooNoo; August 28th, 2005 at 05:16 AM.
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
August 28th, 2005, 06:32 PM
#11
Yeah, the security allows macros. Haven't tried editing logged on as him, although it is an idea and I will try it on Tuesday with a re-compile.
To save, I just call the SaveAs dialog to the screen. I decided it was easier that way then force save somewhere that might change in the future. The drive is mapped as far as I'm aware (the logon script says mapping S: to //xxxxxxxxx/xxxxxxxx/xxx).
-
August 29th, 2005, 04:55 AM
#12
Driver Terrier
So the actual save is not done programmatically? Or do you mean ActiveWorkbook.SaveAs Filename:="S:\User\JoeDoe\" & MyFile
Never, ever approach a computer saying or even thinking "I will just do this quickly."
-
August 30th, 2005, 02:24 AM
#13
The line I use in the code is: Application.Dialogs(xlDialogSaveAs).Show. So yes, the actual save is not done programmatically. I've previously tried the SaveAs line but I decided it was unappropriate in this case.
-
August 31st, 2005, 05:23 PM
#14
Registered User
Are you sure the user has the same VBA components installed on his computer?
Office doesn't, by default, install all VBA. I go in and tell it to install ALL of Office, and then I de-select the Language bar, Hand Writing toy, and a couple other stupid M$ annoyances.
The VBA is grayed-out, by default. So that means only some of most-often used components are used. If your macro needs a newer version of Office VBA, or Office Service Pack, or additional components, then it could create similar problems.
To determine whether the problem is with the security, or with the user's computer, you could set the user up on your computer as a local admin and see if it works while he's logged on. If it does work, then the problem is with something on his computer (setting or component).
-
September 1st, 2005, 02:11 AM
#15
Thanks for the reply.
The VBA code only runs across 2 workbooks and has no references to other Office apps, so there should be everything required installed. As for the Office installation, the IT people image a standard issue drive which has all of Office installed. He definately has the necessary VB editor and whatnot as I've edited code on his PC before now.
Unfortunately I do not have rights to set up any users at work. I'm an intern, and I do have full admin rights for some reason, but I'd get chopped up into small bits if I'm bad. I finish tomorrow, so after that it's not my problem. I'll check the code again today and do some further testing however.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks