What does this error message mean?

Rojena

New Member
Joined
Nov 19, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to run a macro, but I keep getting this login error. I have access to all directories/folders needed to run this macro and my credentials are all up to date. Can someone please help me! :(
1615300852777.png
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
What macro are you trying to run?
 
Upvote 0
What macro are you trying to run?
Hey RoryA, thanks for the reply!

I am trying to run a macro that imports files from a range of different folders, all of which I have access to. So, that is why I am confused about the error message.

Thanks!
 
Upvote 0
We aren't psychic, so we'll need to see some code, please. ;)
 
Upvote 0
We aren't psychic, so we'll need to see some code, please. ;)

Sorry about that! It's just that this file is confidential, but I have attached a screenshot of the place where the code breaks and I get the "Login failed for user" message.

1615303846819.png


Thanks.
 
Upvote 0
Whatever login details it's using in the clsSQL class are clearly invalid. That's about all I can say without seeing the Class_Initialize code for that class.
 
Upvote 0
Whatever login details it's using in the clsSQL class are clearly invalid. That's about all I can say without seeing the Class_Initialize code for that class.
Here is the class initialize code. Not sure what I need to do to validate my credentials:


1615305745186.png
 
Upvote 0
It's using your windows login as credentials so it would appear those are not valid for that database.
 
Upvote 0
It's using your windows login as credentials so it would appear those are not valid for that database.
Oh I see, thanks for your help on this! Would you happen to know how I could go about validating them for that database? My credentials work with every system in the network/I am able to run other macros which reference this specific database as well. I am wondering if I could do something to this existing code as a workaround?


Thanks!! :)
 
Upvote 0
You'd have to check with your DBA for that. The database name looks a little odd, so I assume that's a port number added to it. You might need to check that too.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top