View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
humejap humejap is offline
external usenet poster
 
Posts: 1
Default Open & run a workbook macro.

Try this ( you might need to ensure the OpenDJSalesData macro is define
as Public ) -

Dim vPath As String
Dim vWBOpenDataFileName As String

Sub OpenDataFile()

Dim wbkSalesDataMacro As Workbook

vPath = ActiveWorkbook.Path
vWBOpenDataFileName = "DJ Sales Data Import macro for Judith.xls"
Set wbkSalesDataMacro = Workbooks.Open(vPath & "\"
vWBOpenDataFileName)
Debug.Print wbkSalesDataMacro.OpenDJSalesData
Stop
End Su

--
Message posted from http://www.ExcelForum.com