Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default openning spreadsheet

Thanks a lot. I'm doing the checking whether the workbook
is opened. It's working good. But, if it's opened how can
I activate (open) another worksheet.

If logFileIsOpened = True Then '< checking working good

' < what should I do here to open another worksheet
without reopenning workbook

Else
'< It's working good
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(strFileName)
Set xlSheet = xlBook.Worksheets(strRecipeNum)
xlSheet.Activate
DoCmd.SetWarnings True
xlApp.DisplayAlerts = True
xlApp.Visible = True
xlApp.AskToUpdateLinks = True
End If

-----Original Message-----
Your button is executing

Set xlBook = xlApp.Workbooks.Open(strWorkbookName)

every time it is pressed. You need to check whether the

worbook is already open: if yes, don't open it otherwise
open it.

.

Reply
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
how do I set up the openning type of file Alberto Sanchez Excel Discussion (Misc queries) 0 July 7th 09 04:26 PM
Openning spesific file in Excel Farhad Excel Discussion (Misc queries) 1 November 29th 07 02:11 PM
Openning Excel Files takes too long rook Excel Discussion (Misc queries) 1 April 24th 06 10:05 PM
Openning a new document Jeffrey Excel Discussion (Misc queries) 4 July 17th 05 02:38 PM
Openning an .csv file hbarniv Excel Discussion (Misc queries) 4 December 1st 04 12:29 AM


All times are GMT +1. The time now is 07:08 AM.

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"