473,395 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Run-time Error 52, Bad file name or number

Problem with Excel Macro contacting a SharePoint folder in Windows 10.
I have a model that has been running under Windows 7 for several years without a problem. When i migrated to Windows 10 the part of the macro that is looking for a folder on SharePoint no longer works. I have tried the same macro but referencing a local file on my laptop and there is no problem.
When I ran the debug it highlights the line for:

If Len (Dir(vSource & vFile) ) = 0 Then


Attached Images
File Type: png Macroserror.PNG (159.6 KB, 3453 views)
May 24 '19 #1
5 4572
Luuk
1,047 Expert 1GB
Your replaced your system (from Windows7 to Windows 10), you did not change anything to the macro in Excel, and it gives an error.

Option 1: You have not enough right (under windows 10) to access this SharePoint folder.

Option 2: Something is missing to your installation of Excel under Windows 10.

For this to solve more info is needed than a picture and the description you gave in the subject of this message.

What values do the variables 'vSource' and 'vFile' have? Do they point to a correct destination in SharePoint?

When reading Error 52 on the site of Microsoft, its unclear if this is related to your problem.
May 25 '19 #2
zmbd
5,501 Expert Mod 4TB
Luuk, your link points to the system level error
This is the link to
VBA Runtime Error 52

What values do the variables 'vSource' and 'vFile' have? Do they point to a correct destination in SharePoint?
Exactly, this is your first trouble shooting step.
Place a few Debug.print and <ctrl><g> to see how these two strings are resolving.
May 26 '19 #3
Luuk
1,047 Expert 1GB
@zmdb: I was 'as-lazy-as' @adanvilla10,
and did stop reading after 'Error 52'

The text after this 'Bad file name or number' would (or should) have made bells ringing.

@adanvilla10: Happy debugging!
May 26 '19 #4
zmbd
5,501 Expert Mod 4TB
mea-culpa : We stand among great friends : Happens even to the best of us, look back thru my posts thru the years (how did that happen?!), Neopa, Rabbit, and I think even you have fixed many of my oversights :)
May 26 '19 #5
NeoPa
32,556 Expert Mod 16PB
That's some code with a lot of problems. Forget the logic. It's a mess.

Check out Before Posting (VBA or SQL) Code. Oh, and always post the code in text as a picture is as close to useless as you ever want to get.

PS. Well done Zmbd, but don't sweat it Luuk. As Z says - we all make mistakes from time to time.
May 26 '19 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Victoria Chin | last post by:
Could someone point me in the right direction? I've migrated three FrontPage 2002 websites to a new web server. Each web site has a Access 2000 database on the data server. I have the global.asa...
7
by: Ivan Debono | last post by:
Hi, I keep getting an Unknown runtime error on line 3 below: 1 If oField.Type <> 136 Then 'adChapter 2 If Right(oField.name, 3) = "_id" Then 3 For Each...
2
by: Aleksandar | last post by:
Hi, I need to convert set of Java classes exported from IBM Modeling environment to C# for implementation. When I invoke JCLA conversion from File->Open->Convert in Visual Studio 2005 it starts...
0
by: kalyanijala | last post by:
Hi There, I have a problem running a VB program. This programs actually reads a DAT file and gives the best CPU time taken to run the program. for example I'm reading files like TN3004, TN3104 ,...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
4
by: rohitdoke | last post by:
Hello, we are using IIS 6.0 and facing an error as Microsoft VBScript runtime error '800a01c2' Wrong number of arguments or invalid property assignment: 'verifychecksum' ...
1
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. ...
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
4
by: Gavin MUNJANJA | last post by:
Hi Guys can you please assist im getting Below error Microsoft VBScript runtime error '800a0009' Microsoft VBScript runtime error '800a0009' Subscript out of range: '' ...
1
by: mishika | last post by:
Q: getting runtime error 52 bas file name or number D:Public Function gf_ChkMkDir(iDirPath As String, iDirName As String) As Boolean Dim MyPath As String gf_ChkMkDir = False MyPath =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.