A
Alan
Is it possible pass control to a macro in a second workbook that
requires the value of a variable from the first?
The code I have so far is:
Sub CallResultsAnalyser()
Dim ThisWb As String
Dim ResAnalysis As String
ThisWb = ActiveWorkbook.Name
ResAnalysis = "p:\results analyser.xls"
' Open the results analyser if it isn't already open
On Error Resume Next
Application.Workbooks.Open (ResAnalysis)
On Error GoTo 0
Application.Run ("'Results Analyser.xls'Main!AnalyseResults",ThisWb)
End Sub
It's the last statement I am having problems with - the aim is to run
AnalyseResults(ThisWb) in the workbook Results Analyser.xls ... can it
be done?
Thanks in advance (even if it is bad news!)
Alan
requires the value of a variable from the first?
The code I have so far is:
Sub CallResultsAnalyser()
Dim ThisWb As String
Dim ResAnalysis As String
ThisWb = ActiveWorkbook.Name
ResAnalysis = "p:\results analyser.xls"
' Open the results analyser if it isn't already open
On Error Resume Next
Application.Workbooks.Open (ResAnalysis)
On Error GoTo 0
Application.Run ("'Results Analyser.xls'Main!AnalyseResults",ThisWb)
End Sub
It's the last statement I am having problems with - the aim is to run
AnalyseResults(ThisWb) in the workbook Results Analyser.xls ... can it
be done?
Thanks in advance (even if it is bad news!)
Alan