Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access macro in another file

Status
Not open for further replies.

RiderJon

Programmer
Aug 26, 2002
190
0
0
FR

Hi,

Is there a way to define a global macros?

I mean I have a macro in one excel file. However, I want to run that macro from another file. I could copy the code into the new file and run it. But that is tedious.

I could also open the file that contains that macro and then run it from the new file. But that is tedious too.

Thank you

RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
Okie ..... Public does it.....

Another problem:

how do I delete a funny looking square box. I download data from a server. Automatically it places a square box all over.

The only way to delete it is to click on the "Design Mode" symbol for the excel macro and then click on the the "square box".

But doing that for 100s of those boxes is tedious again.

Thank you

RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
okie ... Public didn't work ....

public sub Test () .....

Now got 2 problems:

1) making global
2) removing that funny symbol.

Thank you

RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
Anyone out there ..... pls. advise.

Thank you

RiderJon
"I might have created ctrl+alt+del,
But Bill made it famous" - Dr. Dave
 
In Windows Explorer, browse to C:\Program Files\Microsoft Office\Office\Xlstart (default location)
Right-click in blank area of right pane
Scroll to New > Text Document
Rename as Personal.xls and press Enter
When asked if you want to change the extension, click Yes
Double-click Personal.xls to open it in Excel
Click Window > Hide
Click File > Exit
When asked if you want to save the Personal macro workbook, click Yes

The next time you run Excel, Personal.xls will run but remain hidden.

To store macros in Personal.xls
Click Window > Unhide
[Create your macro(s)]
After storing a new macro, click Window > Hide

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top