Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run module in another workbook
hi,
I have a Sub Option_Change() in a module called OptionChanger. I would like to know how I can refer to this module and run it from another workbook? Thanks in advance, geebee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run module in another workbook
Here is an example from my workbook named NCP Work.xls. It will open (NCP
Tracking.xls) and run a macro (RunUpdate) in that workbook that is in the same folder path. Sub RunTracking() Dim cdir As String Dim wb As Workbook For Each wb In Workbooks If wb.name = "NCP Tracking.xls" Then MsgBox ("NCP Tracking.xls is already open.") Exit Sub End If Next wb cdir = ActiveWorkbook.Path Workbooks.Open cdir & "\NCP Tracking.xls", password:="NCP" Application.Run ("'NCP Tracking.xls'!RunUpdate") End Sub Mike F "geebee" (noSPAMs) wrote in message ... hi, I have a Sub Option_Change() in a module called OptionChanger. I would like to know how I can refer to this module and run it from another workbook? Thanks in advance, geebee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run worksheet module code from workbook module? | Excel Programming | |||
Automatically Delete WorkBook 2 modules by using Workbook 1 module | Excel Programming | |||
Copy VBA Module and Form from Workbook to another workbook | Excel Programming | |||
Workbook and Standard Module | Excel Programming | |||
Inserting Module into Workbook | Excel Programming |