General discussion

Locked

Loss of focus when recording VB macros

By Jeffrey Willits ·
I wish to record a macro in Microsoft Project 2000 that starts a companion product's macro (ProChain Solutions) and marks a checkbox in ProChain's form. Unfortunately, Project's macro recorder gives up the focus when ProChain's form is opened. Is there a trick to keeping the macro recorder recording in such a situation?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Loss of focus when recording VB macros

by DKlippert In reply to Loss of focus when record ...

You could use SendKeys.
Here?s a sample from the VB Help file:

Dim ReturnValue, I
' Run Calculator.
ReturnValue = Shell("CALC.EXE", 1)
' Activate the Calculator.
AppActivate ReturnValue
' Set up counting loop.
For I = 1 To 100
' Send keystrokes to Calculator
' to add each value of I.
SendKeys I & "{+}", True

Next I
' Get grand total.
SendKeys "=", True
' Send ALT+F4 to close Calculator.
SendKeys "%{F4}", True

Collapse -

Loss of focus when recording VB macros

by Jeffrey Willits In reply to Loss of focus when record ...

Thank you - this has me on my way!

Collapse -

Loss of focus when recording VB macros

by Jeffrey Willits In reply to Loss of focus when record ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums