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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,215,757
Messages
6,126,695
Members
449,331
Latest member
smckenzie2016

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