Hi there,
I'm completely at a loss, this is a very strange problem.
I have a button on a form which should open a spreadsheet and call one of its procedures.
It works fine ... except that it runs twice!
Here is my code:
I'm completely at a loss, this is a very strange problem.
I have a button on a form which should open a spreadsheet and call one of its procedures.
It works fine ... except that it runs twice!
Here is my code:
Code:
Private Sub Command25_Click()
Dim oApp As Object
Dim wb As Workbook
Set oApp = CreateObject("Excel.Application")
Set wb = oApp.Workbooks.Open("MyBook.xls")
oApp.Run "mySub()"
wb.Close
oApp.Quit
Set wb = Nothing
Set oApp = Nothing
End Sub
[\code]
If, for example, mySub() just pops up a message box, the message will appear twice in a row!!!
Any help would be greatly appreciated,
Nath