custom toolbar buttons

Jackeb

Board Regular
Joined
Mar 20, 2002
Messages
81
I have a custom toolbar button that opens a userform

Public Sub FormReturn27()

Hide_All
mfareaval = "27A"
UnitFormS.Show

End Sub


whaere hide_all just hides all but 1 worksheet

the problem is that I get this error:

Adocument with the name "..." is already open, Your cannot open two document with the same name even if the documents are in different folders.

as far as i can tell I m not trying to open anything... just show a form...

any ideas?

Ed
 

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"
I'm guessing this is a UserForm and that you have some code in the Initialize or the Activate event that has a line like:

Workbooks.Open etc etc

Even though the debugger is highlighting the .Show code line, the problem is really with your userform, not this line of code. It's sort of a quirk of the VBE debugger.
 
Upvote 0
I had a similar sounding problem after moving a workbook between drives. The custom toolbar had macros associated with various buttons, these had to be re-associated with the macros in the new workbook location, other wise I was given the same fault message as you are getting.
 
Upvote 0

Forum statistics

Threads
1,213,564
Messages
6,114,334
Members
448,567
Latest member
Kuldeep90

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