I have a line of code:
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
Msgbox Err.number
When I run this code in a .vbs file, It gets executed successfully without throwing any error(Err.number=0).(I just created a text file on desktop, changed its extension from txt to vbs, inserted this code, saved and double-clicked the vbs file -It ran correctly without errors - Not sure if this approach uses 32 bit or 64 bit wscript.exe by default. I need to understand this. Could someone please explain this also apart from the main issue below?)
Issue:
When I place this code in a UFT script, It is throwing the error 429 - ActiveX component can't create Object. It remains stuck on the line Set objExcel = CreateObject("Excel.Application")
for some time and finally throws the error 429.
Additional Info:
Windows 7(64 Bit)
UFT - 32 Bit - Version: 12.02
Excel - 32 Bit(version - 14.0.7181.5000)
I have looked at a lot of places for this issue and I think It has something to do with some architecture mismatch as mentioned in a few answers here(Not sure If I am pointing you guys to the correct place).
I would really appreciate If someone explains why the code runs fine in vbs but not in UFT script? I really need to make it work in UFT scripts.
Thanks for helping.