R
RB Smissaert
Using Excel 2002.
Have a simple sub that picks up a value from the active sheet, activates
another application and sends the value to the application. This sub runs
through a command button on a userform.
When I click the command button all works fine.
The command button has an accelerator key in this "z".
When I do Alt + z the application gets activated but the values don't get
send.
The simplified sub goes like this. The application is not actually
Calculator, but this sub shows the same behaviour.
Sub Test()
Dim ID As String
ID = ActiveCell.value
AppActivate "Calculator", True 'tried False as well
SendKeys ID, True
End Sub
When I put MsgBox ID before the line AppActivate it works again with the
accelerator key strokes.
It seems this problem has to do with focus, but I can't see the solution.
Thanks for any advice.
RBS
Have a simple sub that picks up a value from the active sheet, activates
another application and sends the value to the application. This sub runs
through a command button on a userform.
When I click the command button all works fine.
The command button has an accelerator key in this "z".
When I do Alt + z the application gets activated but the values don't get
send.
The simplified sub goes like this. The application is not actually
Calculator, but this sub shows the same behaviour.
Sub Test()
Dim ID As String
ID = ActiveCell.value
AppActivate "Calculator", True 'tried False as well
SendKeys ID, True
End Sub
When I put MsgBox ID before the line AppActivate it works again with the
accelerator key strokes.
It seems this problem has to do with focus, but I can't see the solution.
Thanks for any advice.
RBS