Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2009, 05:32 AM
Registered User
 
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automate excel app

Hello all,

I am trying to automate excel application using rational robot. Because the rational robot not recognized the objects, I tried coding vba so that I can use that code in robot.

I have a window with username that I need to select and submit which does some process.

I am able to call the menu item using the below code but once the window is displayed I cannot click the submit button.


In vba.. after this code i.e once the window is displayed I cannot go for next line of code in debugging mode as well.

Application.CommandBars("Worksheet Menu Bar").Controls("Data").Controls("Create Template").Execute

Please help me out.




This is the rational script code:

Dim objExcelApp as object

Set objExcelApp = CreateObject("Excel.Application")
objExcelApp.Visible = true

objExcelApp.Workbooks.Open ("F:\data development\Test Data Creation Tool\Test Data Creation Tool.xla")
objExcelApp.Application.CommandBars("Worksheet Menu Bar").Controls("Data").Controls("Create Template").Execute

Window SetContext, "Caption=Create Template", ""
objExcelApp.Controls("Uname").Value="ADMIN"


Thanks,
sanjay
 
Old November 13th, 2009, 08:33 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Can you try SendKeys

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Data Grid to Excel in VB.net Windows App alapativg VS.NET 2002/2003 0 September 2nd, 2006 02:28 AM
Using Excel Chart Object in VB App John Pennington Beginning VB 6 1 July 12th, 2006 01:39 PM
VB6 Excel App to .NET problem zayasv VB.NET 0 October 24th, 2005 04:08 PM
VB6 Excel App to .NET problem zayasv General .NET 0 October 24th, 2005 04:05 PM
RESOLVED - cleanup after launching Excel App cliffd64 VB.NET 2002/2003 Basics 2 June 7th, 2005 02:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.