Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default how can i open a second workbook using a vba code


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default how can i open a second workbook using a vba code

dim wkbk2 as workbook
set wkbk2 = workbooks.open(filename:="c:\somefilename.xls")


uk wrote:

--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default how can i open a second workbook using a vba code

hi i have tried the code that you recommended but i cannot get it to work

"Dave Peterson" wrote:

dim wkbk2 as workbook
set wkbk2 = workbooks.open(filename:="c:\somefilename.xls")


uk wrote:

--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how can i open a second workbook using a vba code

Not if you did not add more to it.

Show us the code you tried that does not work.


Gord Dibben MS Excel MVP

On Thu, 26 Nov 2009 09:20:01 -0800, uk
wrote:

hi i have tried the code that you recommended but i cannot get it to work

"Dave Peterson" wrote:

dim wkbk2 as workbook
set wkbk2 = workbooks.open(filename:="c:\somefilename.xls")


uk wrote:

--

Dave Peterson
.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default how can i open a second workbook using a vba code

this is a code from MACROS MADE EASY

Sub Workbook_Open()
Workbooks.Open("data.xls")
End Sub

"Gord Dibben" wrote:

Not if you did not add more to it.

Show us the code you tried that does not work.


Gord Dibben MS Excel MVP

On Thu, 26 Nov 2009 09:20:01 -0800, uk
wrote:

hi i have tried the code that you recommended but i cannot get it to work

"Dave Peterson" wrote:

dim wkbk2 as workbook
set wkbk2 = workbooks.open(filename:="c:\somefilename.xls")


uk wrote:

--

Dave Peterson
.


.



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 open a data workbook when i open a timesheet workbook [email protected] uk Excel Discussion (Misc queries) 2 January 4th 09 04:50 PM
How to code VBA: Auto open workbook and run macro March Excel Discussion (Misc queries) 4 November 8th 07 08:25 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
Need VB code for workbook open to open a link Daniel Baker Excel Discussion (Misc queries) 2 August 18th 06 01:30 AM
Need VBA Code to Open a Workbook in read only zulfer7 Excel Discussion (Misc queries) 1 July 10th 06 11:00 PM


All times are GMT +1. The time now is 08:11 PM.

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"