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