Solved

TExcelApplication Server and switching between Excel Worksheets

Posted on 2003-11-12
3
572 Views
Last Modified: 2007-12-19
HELP PLEASE

I require to programmatically switch between two differently named Excel worksheets in the same workbook. The excel file is opened from an already existing template so adding new workbooks is not an option. The template is required due to further analysis required on the output data.

Help please!!!

Malachy Scullion

0
Comment
Question by:malachyscullion
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 25 total points
ID: 9731429
0
 

Author Comment

by:malachyscullion
ID: 9738517
Thanks for the reply GloomyFriar,

Is there a way of passing the worksheet name as a parameter to a function that changes focus to the selected worksheet?????

ie) excelapplication1.worksheets.select('sample_worksheet_name')
ie) WorkSheet := WorkBk.WorkSheets.Get_Item(1) as _WorkSheet;


most of the solutions i have seen already involve adding your own blank worksheets. this is not valid solution in my case!

thanks

Malachy
0
 

Author Comment

by:malachyscullion
ID: 9738565
Figured out how to do it.......

    WS := ExcelApplication1.Worksheets.Item['sample_worksheet_name'] as _Worksheet;
    WS.Activate(lcidExcel);

Thanks

Malachy
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now