I'm pulling my hair out because I've run into the following problem with one of my clients:
My program uses extensive VBA automation in Word. Macros are saved in a specific Word template that is attached to each document. Some of the macros save the current document to a temporary folder under [User]/AppData/Roaming/... for further processing.
The client is using Win7 with Office2007 (Student edition). On the computer in question I keep getting an error with something like "No permission to save the file" (can't give exact error message because I've translated it from my language to English)
This happens when the macro tries to "SaveAs" the document.
The strange thing is that it happens only 8 out of 10 times - and not all the time. There are no special permissions set for the temporary folder I'm trying to save to.
I've tried changing Word security settings, tried adding the folder to the trusted folders list, tried using a different folder - to no avail.
The client's computer has Norton Antivirus (or Internet Security, I dunno) installed but temporary disabling it didn't solve the problem. (I know I should only be sure after a full uninstall but I can't do that on the client's comp)
Any help is appreciated!
Update: I've since found the exact error message in English: "Word cannot complete the save due to a file permission error."
I'm now looking on the web for similar forum posts but if you guys know something, please let me know. Thanks!
Is an antivirus or similar program running? On my development computers many similar problems went away when I changed from (vendor "X" security bundle) to ESET.
Related
I have written a rather complex application in Microsoft Access. It is split into front end and back end files. To protect my code, I have compiled it and saved it as a runtime .accde file, which I then changed to an .accdr file to ensure it operated as a runtime. I have created two versions of the application: one for those with 32-bit Office installed and one for those with 64-bit office. I have used Inno Setup to package the application, the data file, and other files such as the icon file, the license file, etc., into an installable package, which works just fine.
Among my team of 27 beta testers of this application, so far 6 have downloaded it, and I have tested it on four of my own computers. On seven of these computers, the installation works perfectly and the application runs with no problems.
On the computers of three of my testers, when they try to run it, they get this error message:
The expression On Open you entered as the event property setting produced the following error: Bad file name or number.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
I'm pretty sure I know where the code is that's causing the problem, but cannot for the life of me figure out why the application crashes on those 2 computers but not on others.
The On Open event I suspect of causing the problem checks the linked tables, gets their connect string, then looks at the path for that string for the back end database. If it does not find it there, the procedure pops up a file selector dialog and instructs the user to find the data file, then it relinks all the tables.
If anyone could point me in the right direction to fixing this problem, I would be extremely grateful.
This is typically caused by a reference labelled as MISSING.
You have two (three) options:
Run the application on the offending machines with a full version of Access that lets you debug the code
Create a small test application that lists and verifies the references you use, and run this on the offending machines
Remove those two customers
Thanks to all the contributors here. Because of these folks and additional online research, the latest answer I can find is this:
This error occurs on a small percentage of computers on which the app is installed, and no one has yet figured out why, what causes it, or how to fix it. The workaround is to install the 2013 version of the Access runtime, as later versions will still cause the problem.
At least one of the offending computers is running the Click-to-Run version of Office. Still gathering information, but that's the status as of now.
The best way to sum up the issue would be with a screenshot, but unfortunately my screenshots auto-save to downloads and so I can't upload them. What's happening is that when I enter the 'file select' dialog in trying to upload a file, it's automatically in the 'drive' folder and won't move to any other folder. I've tried restarting and resetting my machine, tried the upload process on a bunch of different platforms, tried using the other user account on my machine, tried updating my software, but none of these have made any difference. I can get into my downloads folder and open files from it fine outside of this context, and I can workaround by using the drag-and-drop to upload on platforms which have this feature, but otherwise I'm stuck.
I've googled extensively to see if anyone else is having this issue and have found this thread: https://productforums.google.com/forum/#!topic/chromebook-central/d7g9EEDsr8w but there's no helpful solution there (recommended a powerwash but the asker has already done this several times). I've also tried to find a solution with the help of my (programmer) employer, but no luck so he recommended asking here. It seems like it wouldn't be a hardware issue when I can still access the folder outside of this specific function, but if it were a problem with the running system it seems it would be happening across the board and therefore show up more in a google? If anyone has any suggestions I'd be very grateful as it's getting quite tiresome having to drag and drop things into Facebook messages to get them uploaded! The machine is less than a year old so if I can't find any solution I'll see about getting it replaced under warranty. Thanks in advance for any help, and please let me know if there's any key info I've left out!
Machine: Samsung Chromebook XE303C12
OS: Version 38.0.2125.110
Here's the short version... let me know if any additional information can help.
I have an Excel document on SharePoint. I have two users who both are in the same security group and both have contribute access to the document.
On one user, workbooks.cancheckout("http://address/document") returns true as long as nobody else has it checked out. As designed.
With another user, workbooks.cancheckout("http://address/document") returns false. All the time.
The user CAN check the document out directly from SharePoint, so this is NOT a permissions issue. I believe it has something to do with the way Excel is trying to talk to SharePoint.
What causes "cancheckout" to return false, and does anyone have any suggestions on what is causing or how to fix this error?
The working user is using Office 2010. The broken one is 2013. However, several other users, all on 2013, are not having the error. OS is Windows 7 for all users.
I has similar issue. I asked user to manually access share point portal document from their desktop and then use excel VBA program. It works. if you change password then you have to manually go to share point and access that document so your credentials are stored somewhere in cache. It is wired but this is they way I resolved problem faced by one of my user.
I have a suite of MS-Excel scorecard calculators that I send to 200 odd clients. In all client environments save 1 the calculators work 100%. However one client is experiencing the following problem.
Periodically the spreadsheet gets a Microsoft Visual Basic Run-Time Error. The exact message is:
Microsoft Visual Basic
Run-time error '-2147417848(80010108)':
Automation error.
As I mentioned, this happens only at one customer site. Everywhere else the spreadsheet runs 100%.
Can anyone shed some light as to why this happens at one site out of 200 odd.
It is possible to provide some diagnosis.
Do a search of user's system for any *.exd files. They may be in a hidden folder.
Delete any *.exd file you find. They are temporary files and will be rebuilt by Excel.
Try to run the file again. Sorry I can't provide more detailed help, but this is a start based on the information provided.
I have a form that has a list box and several buttons that run sqk statements for the list box.
sub on_onClick()
' error checking
me.listbox.rowsource = "SELECT tblMain.First, tblMain.last FROM tblMain ORDER BY tblMain.Last;"
so this kinda thing is what I use for the list box. it works fine for me in the .mdb, and after i have converted the database, split it, made the .mde I go into the mde and it works fine for me still. This is placed on a shared drive
HOWEVER, anyone else that tries to use this, none of the buttons are having an effect. Can't tell if they are not working, or the VBA is not returning any results for them. It works for me, but it is not working for them. So...this is for my local LAN team, I think they all have full control permissions??? The button clicks that get them to that form are working fine also.
please help!
A couple of things come to mind:
It is not clear from your question whether the mde file itself is on a shared drive or whether the back-end database is on the shared drive and each user has a copy of the mde file on their PC. If the users are using the same mde file on the network share then I would strongly suggest not taking this approach. (It probably isn't the cause of the issue, but it will get you into trouble down the road.) Give each user a copy of the mde (front end) and have the application point to the back-end database on the network share.
Make sure that the mde has the ability to relink the tables to the back-end mdb file.If you search SO you'll probably find examples of how to do this in code.
I suspect you may be running into an issue where the mde file is not able to find the back-end tables. In this case you won't receive an error message in your VBA code when you're setting the listbox's rowsource and it will appear as though nothing is happening.
Do they have Macro security disabled? By default, MAcro security is enabled in Access and none of your VBA code will run. To disable: open Access, Tools -> Macro -> Security and set to low.
I think it is generally best to use self-certified projects or a secure location rather than change security levels.
Some information on macro security:
Self Certify projects
General information on security principals for Office code and macro security
Trusted location defaults for Office 2003
Macro security in Office 2003