Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Call VBA-Subs From Old XLM-Macros

Hello there,

how can I refer to vba-code from an xlm-macrosheet ?

Thank you in advance,

Kind regards,

H.G. Lamy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Call VBA-Subs From Old XLM-Macros

Hi,

Try the following. I've migrated some old systems with
similar code.

In the macro code on the Macro Sheet:
=RUN("FileName.XLM!ProtectSh",FALSE)
or (Both .xlm and .xls file extensions work)
=RUN("FileName.XLS!ProtectSh",FALSE)

where FileName is the name of the file with the VBA code

The 4.0 macro and VBA code can be in the same file, but
need not be.


The VBA code in the file with the called routine:
'*** PROTECT THE ACTIVE SHEET - NO PW ***
Sub ProtectSh()
ActiveSheet.Protect DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Best Regards,
Walt
-----Original Message-----
Hello there,

how can I refer to vba-code from an xlm-macrosheet ?

Thank you in advance,

Kind regards,

H.G. Lamy


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Call VBA-Subs From Old XLM-Macros

Thank you Walt !

Regards,

H.G. Lamy

"Walt Weber" schrieb im Newsbeitrag
...
Hi,

Try the following. I've migrated some old systems with
similar code.

In the macro code on the Macro Sheet:
=RUN("FileName.XLM!ProtectSh",FALSE)
or (Both .xlm and .xls file extensions work)
=RUN("FileName.XLS!ProtectSh",FALSE)

where FileName is the name of the file with the VBA code

The 4.0 macro and VBA code can be in the same file, but
need not be.


The VBA code in the file with the called routine:
'*** PROTECT THE ACTIVE SHEET - NO PW ***
Sub ProtectSh()
ActiveSheet.Protect DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Best Regards,
Walt
-----Original Message-----
Hello there,

how can I refer to vba-code from an xlm-macrosheet ?

Thank you in advance,

Kind regards,

H.G. Lamy


.



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
macro to call other macros Colin Hayes Excel Worksheet Functions 1 May 3rd 11 05:04 PM
How do I call VBA subs from different spreadsheet from code behind form? clhamilton Excel Discussion (Misc queries) 1 June 12th 09 05:47 PM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Call macros from another XL file jamesa Excel Programming 2 October 2nd 03 05:51 PM
Macros - call or launch from fromula Paul Excel Programming 2 September 3rd 03 08:09 PM


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

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

About Us

"It's about Microsoft Excel"