Macro doesn't work for me, but works for others

craigo298er

New Member
Joined
Jan 16, 2019
Messages
24
I had this macro made and it works for at least 6 other people that I've seen run it successfully. When I use the same file, on the same network, with the same security settings, with the required password entered correctly...it doesn't work and gives me errors. I have other macros that pull data from the same databases successfully. Why am I unable to run it
 

Attachments

  • 1004.PNG
    1004.PNG
    7.2 KB · Views: 9
  • debug.PNG
    debug.PNG
    23.6 KB · Views: 8
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi,
its more helpful to forum if you post all your code using code tags (menu bar > VBA)

Just a guess but see if replacing the highlighted line with following & see if resolves

VBA Code:
 Set endcol = ws.Cells(1, ws.Cells(1, ws.Columns.Count).End(xlToLeft).Column)

If not, then post all your code - plenty here to assist you

Dave
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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