LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default opening diff. worksheets in opened workbook

How could I open another spreadsheet in the same workbook
if the workbook has been already opened?
I'm doing it from MS Access.

If logWorkbookIsOpened = False Then
'it's working good
Set xlBook = xlApp.Workbooks.Open(strWorkbookName)
Set xlSheet = xlBook.Worksheets(strWorksheetName)
xlSheet.Activate

xlApp.Visible = True

Else
'here is a mistake #0
Set xlSheet = Workbooks(strWorkbookName).Worksheets
(strWorksheetName)
xlSheet.Activate
xlApp.Visible = True

End If

Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to print a workbook but worksheets have diff print areas Angela Steele Excel Discussion (Misc queries) 1 January 17th 08 07:39 PM
Is there away to keep Excel from opening a copy of an already opened workbook and the pages not be at 100% but Marc New Users to Excel 1 March 13th 06 01:51 PM
Count If 2 Diff Values Appear on Several Worksheets w/in Workbook Kat Excel Worksheet Functions 5 September 22nd 05 06:44 PM
Slow opening Excel Workbook with over 50 Worksheets KathyRice Excel Discussion (Misc queries) 1 January 4th 05 11:49 PM
Is it possible to require that a KEY NUMBER be imputed in a workbook 1 before workbook 2 can be opened? Marcello do Guzman Excel Programming 0 October 15th 03 06:29 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"