Accessing a worksheet in an Excel workbook 
Author Message
 Accessing a worksheet in an Excel workbook


    I've been having a real annoying problem.  I want to obtain access
to a paticular sheet in a workbook containing a number of sheets.

    I can get VB to open the excel workbook, but it wont go to the one
sheet that I want the user to have access to.

   Any ideas?



Tue, 21 Oct 2003 08:52:55 GMT  
 Accessing a worksheet in an Excel workbook

dim xlbook as Excel.Workbook
dim xlsheet as Excel.WorkSheet

Set xlbook = xlApp.Workbooks.Open(strFilePath)
Set xlsheet = xlbook.Worksheets(strSheetName)

Tue, 21 Oct 2003 17:08:41 GMT  
 Accessing a worksheet in an Excel workbook


>dim xlbook as Excel.Workbook
>dim xlsheet as Excel.WorkSheet

>Set xlbook = xlApp.Workbooks.Open(strFilePath)
>Set xlsheet = xlbook.Worksheets(strSheetName)

Excellent many many thanks

Wed, 22 Oct 2003 10:25:41 GMT  
 [ 3 post ] 

 Relevant Pages 

1. How can I open Excel workbook without using Excel.Worksheet

2. deleting worksheet in excel workbook

3. Word/Excel Insert Single Worksheet from Workbook

4. function to see if an Excel worksheet name exitsts in a workbook

5. processing excel rows - separate workbooks/worksheets

6. Excel - Use the current workbook and worksheet

7. detect the worksheet-names in an EXCEL 5.0 workbook

8. Excel Workbook vs. Worksheet

9. wsh/vba for excel automation: moving worksheets beetween workbooks

10. Save a Worksheet in Excel to a Master Workbook

11. Excel HRESULT: 0x800A03EC when using or Workbooks._opentext in C#

12. Excel 97/2000: making custom functions (in a hidden workbook) available to all open workbooks


Powered by phpBB® Forum Software