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


i am looking for some vb code to open an existing workbook in a ne
workbook.

i have been using the following code

workbook.open "C:\flder1\folder\excel.xls"

but i would like to create a link on a VB form to open a new work boo
whilst keeping the form open. cannot seem to do this but thought i
might work if i could get it to open it in a whole new bookseparate t
the one with the form.

the reason for this is i want to create a shortcut to the workbook th
user will pul information from the complete the form

--
ceem
-----------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065
View this thread: http://www.excelforum.com/showthread.php?threadid=39016

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open new workbook

Dim bk as Workbook
set bk = workbook.open( "C:\flder1\folder\excel.xls")

Not sure what you mean by link. But that creates a reference to the
workbooks which you can use to refer to it.

--
Regards,
Tom Ogilvy


"ceemo" wrote in
message ...

i am looking for some vb code to open an existing workbook in a new
workbook.

i have been using the following code

workbook.open "C:\flder1\folder\excel.xls"

but i would like to create a link on a VB form to open a new work book
whilst keeping the form open. cannot seem to do this but thought it
might work if i could get it to open it in a whole new bookseparate to
the one with the form.

the reason for this is i want to create a shortcut to the workbook the
user will pul information from the complete the form.


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=390164



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open new workbook


would that notopen the spreadsheet in the existing work book

--
ceem
-----------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065
View this thread: http://www.excelforum.com/showthread.php?threadid=39016

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open new workbook

No. That opens the workbook in the same instance of Excel, but they are
still separate workbooks.

--
Regards,
Tom Ogilvy


"ceemo" wrote in
message ...

would that notopen the spreadsheet in the existing work book?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=390164



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open new workbook


is there a way to open it in a searate instance

--
ceem
-----------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065
View this thread: http://www.excelforum.com/showthread.php?threadid=39016



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open new workbook

sure, but I don't see the point. That would just make it extremely
difficult to work with. Based on what you say you are doing, this seems
like the wrong way to go.

but your choice:

Automating excel from excel is no different from automating it from any
other Office product or from VB.

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office

http://support.microsoft.com/support...dev/iisfaq.asp
Integrating Office with IIS FAQ

http://support.microsoft.com/?id=219151
Q219151 - HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic

http://support.microsoft.com/support...automation.asp
Using Automation with Microsoft Excel 97

http://support.microsoft.com/?id=170745
XL97: How to Create PivotTable from Word

http://support.microsoft.com/?id=177760
VBA: How to Run Macros in Other Office Programs

http://support.microsoft.com/?id=153748
ACC: How to Call Excel Functions from Within Microsoft Access

http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

http://support.microsoft.com/?id=159922
XL97: Using Quit Method May Cause Illegal Operation

http://support.microsoft.com/?id=145770
ACC: Automation Does Not Close Microsoft Excel

http://support.microsoft.com/?id=123859
ACC: Sample OLE Automation for MS Word and MS Excel

http://support.microsoft.com/?id=142476
Q142476 - ACC: Using Automation to Create and Manipulate an Excel Workbook

http://support.microsoft.com/?id=199219
XL2000: Automation Doesn't Release Excel Object from Memory

http://support.microsoft.com/?id=213602
XL2000: CreateObject and GetObject Work Differently

http://support.microsoft.com/?id=114347
INFO: OLE Automation Objects with GetObject and CreateObject

http://support.microsoft.com/?id=184273
ACC97: How to Use Automation to Create a Microsoft Excel Chart


http://support.microsoft.com/kbid?129304
ACC: Using Automation to Transfer Data to Microsoft Excel

http://support.microsoft.com/support...151/introd.asp
Office for Windows An Introduction to OLE Automation

http://support.microsoft.com/?id=234774
HOWTO: Automate Excel from an HTML Web Page Using JScript

http://support.microsoft.com/?id=198703
HOWTO: Automating Excel From Client-Side VBScript

--
Regards,
Tom Ogilvy



"ceemo" wrote in
message ...

is there a way to open it in a searate instance?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=390164



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 to: Open closed workbook/Search data tables/Return data to open workbook Hugh Adams Excel Discussion (Misc queries) 0 August 18th 10 02:04 PM
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
how do i open a data workbook when i open a timesheet workbook [email protected] uk Excel Discussion (Misc queries) 2 January 4th 09 04:50 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
How do you program so that Workbook B cannot be open unless Workbook A is open? Plus I need to validation Marcello do Guzman[_3_] Excel Programming 2 December 5th 04 06:50 AM


All times are GMT +1. The time now is 03:12 AM.

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

About Us

"It's about Microsoft Excel"