Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Personal.xls Macros?

I am trying put a macro into the personal.xls file so
that it loads whenever I open a new workbook. I have
made all of the subroutines & functions public, but it
doesn't seem to be working - are there any tricks to make
the new workbook recognize the macro. Thanks in advance
for the help.

Chris.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Personal.xls Macros?

To call a macro in another workbook, you would use

Application.Run "Personal.xls!MyMacro",arg1, arg2

as an example.

--
Regards,
Tom Ogilvy

"Chris" wrote in message
...
I am trying put a macro into the personal.xls file so
that it loads whenever I open a new workbook. I have
made all of the subroutines & functions public, but it
doesn't seem to be working - are there any tricks to make
the new workbook recognize the macro. Thanks in advance
for the help.

Chris.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Personal.xls Macros?

Tom,
Thanks for the help, but it didn't solve my problem. I
am using a command button in Excel (new workbook) to open
the macro (well VB script really) in personal.xls. Here
is the command button statement right now:

Private Sub CommandButton1_Click()
Call SFileOpen 'name of subroutine in personal.xls
End Sub

Once again any help is greatly appreciated.

Chris.
-----Original Message-----
To call a macro in another workbook, you would use

Application.Run "Personal.xls!MyMacro",arg1, arg2

as an example.

--
Regards,
Tom Ogilvy

"Chris" wrote in message
...
I am trying put a macro into the personal.xls file so
that it loads whenever I open a new workbook. I have
made all of the subroutines & functions public, but it
doesn't seem to be working - are there any tricks to

make
the new workbook recognize the macro. Thanks in

advance
for the help.

Chris.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Personal.xls Macros?

I gave you the answer. Call won't work unless you set a reference from the
sheet with the button to the personal.xls file which is generally not
something you want to do.


Private Sub CommandButton1_Click()
Application.Run "Personal.xls!SFileOpen" 'name of subroutine in
personal.xls
End Sub

--
Regards,
Tom Ogilvy



"Chris" wrote in message
...
Tom,
Thanks for the help, but it didn't solve my problem. I
am using a command button in Excel (new workbook) to open
the macro (well VB script really) in personal.xls. Here
is the command button statement right now:

Private Sub CommandButton1_Click()
Call SFileOpen 'name of subroutine in personal.xls
End Sub

Once again any help is greatly appreciated.

Chris.
-----Original Message-----
To call a macro in another workbook, you would use

Application.Run "Personal.xls!MyMacro",arg1, arg2

as an example.

--
Regards,
Tom Ogilvy

"Chris" wrote in message
...
I am trying put a macro into the personal.xls file so
that it loads whenever I open a new workbook. I have
made all of the subroutines & functions public, but it
doesn't seem to be working - are there any tricks to

make
the new workbook recognize the macro. Thanks in

advance
for the help.

Chris.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Macros & Personal.xls PT Setting up and Configuration of Excel 3 April 26th 07 03:32 AM
macros in personal.xls file Steve E Excel Worksheet Functions 0 August 20th 05 10:05 PM
Deleting macros that are available in personal.xls! aiyer[_15_] Excel Programming 2 April 16th 04 05:21 PM
Personal.xls Macros Mark Excel Programming 3 December 7th 03 11:03 PM
Export Personal Macros Lippy Excel Programming 1 November 10th 03 08:14 PM


All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"