Avatar of RWayneH
RWayneHFlag for United States of America

asked on 

VBA AppActivate("[AppWindowTitle]")

AppActivate ("QuickTest Professional - [C:\QTP\TestingScenarios\ThirdParty\TP01 - Customer Change - New Catalog Code]")


Why would this all of a sudden stop working in VBA?  It has been working for some time and now today it is not.  Not even sure what may have changed to cause this.  The file is there.  Another weird happening is that in QTP all references to the File.open....  it did not like either.  I had to re-record/reset the file.open's and those started working.  Also there were other QTP references that I had to reset too, when I did a file import/export functions in QTP.  Any ideas?  Please advise and thanks.
Microsoft Excel

Avatar of undefined
Last Comment
RWayneH
SOLUTION
Avatar of Bitsqueezer
Bitsqueezer
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of RWayneH
RWayneH
Flag of United States of America image

ASKER

So I replaced it with:
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "QuickTest Professional - [C:\QTP\TestingScenarios\ThirdParty\TP01 - Customer Change - New Catalog Code]"

If this will work with the leading chars?  Would the rewrite be?
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "QuickTest Professional"

testing now.
Avatar of aikimark
aikimark
Flag of United States of America image

yes. leading characters.  in VBA, you should be able to use VB's Appactivate statement.
Avatar of RWayneH
RWayneH
Flag of United States of America image

ASKER

Worked!  Thanks for the help. -R-
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo