Solved

still having troubles with an Excel Macro saving to C: on Windows 10

Posted on 2016-10-11
5
67 Views
Last Modified: 2016-10-11
I have this certain file from the Bank to do payroll stuff. I'm running Excel 2010 on a Windows 10 machine.

At the end of the process, I invoke a Macro that saves certain data to a folder on the C: Drive.

The macro always gives the following error:
1
I was able to create a work-around for this in EE post #28974910 (See https://www.experts-exchange.com/questions/28974910/having-troubles-with-an-Excel-Macro-saving-to-C-on-Windows-10.html )

However, it have two files and the work-around didn't work for the second, because the VBA code is locked with a  password.

This spreadsheet and macro was not made by me. This exact same Excel document works just fine on my old computer which was running Windows Server Edition 2012. I transfer the Excel file to the new computer under Windows 10, and the macro gets this error.

Here are some screen shots from the old computer:

The macro in question should save the text file that it generates to a folder called C:\Produbanco\

a) For this exercise I deleted the folder called C:\Produbanco\ just for this exercise. I try to run the Macro. I get this error:
2(It says: "Produbanco folder doesn't exist; please create it).

b) So I make the folder, as requested. No sub folder or anything.
3

c) Now I run the macro again, and it works just fine.
4
(It says: "The Provider payment file was successfully created at C:\Produbanco\pagos fin sep.txt)

The macro works like this. I put in a certain cell the name I want the file to have. It this case, I entered the text:  "pagos fin sep". Then a concatenate puts it all together and I get: C:\Produbanco\pagos fin sep.txt

-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  

Now.... replay with this exact same Excel document, on the same version of Excel, but on the new computer and I get the error as shown  above.

Hope that sheds some light to be able to troubleshoot this issue.



I'm suspecting that there is some kind of security issue going on that I cannot save to the C: drive. If so, please how can I circumvent that?



Thanks for your help! (Joe Winograd, are you there? hopefully we can continue with your previous ideas)
0
Comment
Question by:gregholl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 100 total points
ID: 41839213
You might have to add full access for everyone in the folder's security tab (use the context menu on the folder to get there).
0
 
LVL 54

Accepted Solution

by:
Joe Winograd, EE MVE earned 400 total points
ID: 41839218
Hi Greg,
Yes, I'm still here. I think you're right that it's a security/permissions problem. First thing I would try is right-click on the folder in File Explorer (or whatever file manager you use), then click Properties, then the Security tab. In the top part of that dialog, click whatever group or user name you're using and then look in the bottom part to see if Write permission is checked. If not, log in as Admin and Edit the permissions to include Write. Regards, Joe
0
 
LVL 1

Author Closing Comment

by:gregholl
ID: 41839239
That was the ticket! All set now. thanks
0
 
LVL 88

Expert Comment

by:rindi
ID: 41839242
You just don't save any data into a root folder on C:. You need to save it to C:\Users\Public\Somewhere if it is used by different user accounts, or C:\Users\UserProfile\Somewhere if it is only used by the current user account, or save it to another drive letter, as C: really should only ever be used for the OS:
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE
ID: 41839283
You're welcome, Greg. Of course, rindi's comment represents good practice, but as we discussed at the previous question, you did not write the macro; you would rather not mess with it; and it works just fine on your old computer. So under the circumstances, writing to that folder is a reasonable approach, imo. Regards, Joe
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Office applications crashing 7 34
office 365 5 40
Unabled to open web site 10 34
Server Essentials vs Standard 4 18
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question