VBA Error

juan4412

Board Regular
Joined
Oct 17, 2011
Messages
94
On my machine this code works:
Code:
.SaveAs Filename:="C:\Ricardo\mail\" & Format(Range("G3").Value) & ".xls"

But on anothers PC it highlights the word "Format" and says object or library not installed, but they have the same references installed as I do.

What is throwing this error?
 
Okay, if it works when you qualify the functions with VBA. then I can think of only two things that might be wrong:

(1) You have another, custom function called Format(), which is causing confusion
(2) There's a problem with the "MISSING" references


Since the code works on your PC, (1) cannot be the problem. It must be (2).
All I can suggest it that you look through the references for any others that are "MISSING" , just to make sure they are all unticked.

If that isn't fruitful, then the fallback solution would be to prefix with VBA. This isn't ideal, I know. Hopefully someone else might think of a cause which I've overlooked.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Thanks for all the assistance.

I ended up just prefixing VBA. and it is functioning on other pc's now.
 
Upvote 0

Forum statistics

Threads
1,224,974
Messages
6,182,108
Members
453,088
Latest member
Chaoxite

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