Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default I want a macro that can open a worksheet in a closed workbook

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default I want a macro that can open a worksheet in a closed workbook

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

I know jim but i want to reference certain cells in that sheet and i need to
be able to open it at that sheet not any other in the workbook
--
BD3


"Jim Thomlinson" wrote:

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

can i do that with a macro as i am using 3 different workbooks with sheet
tabs not showing and i dont want the whole workbook showing i just need to
update some cell information
--
BD3


"Chip Pearson" wrote:

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default I want a macro that can open a worksheet in a closed workbook

Do you know the name of the sheet? If so then just open the book and
reference the sheet that you want.

dim wbk as workbook
dim wks as worksheet

set wbk = workbooks.open "C:'MyBook.xls"
set wks = wbk.Sheet1

wks is now referencing sheet1 in MyBook.
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I know jim but i want to reference certain cells in that sheet and i need to
be able to open it at that sheet not any other in the workbook
--
BD3


"Jim Thomlinson" wrote:

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default I want a macro that can open a worksheet in a closed workbook

Is it possible to create a 4th workbook with a sheet containing the cells you
only want updated so the user doesn't see the other sheets or cells you don't
want them to, then link your updates to the 4th workbook?

"bigdaddy3" wrote:

can i do that with a macro as i am using 3 different workbooks with sheet
tabs not showing and i dont want the whole workbook showing i just need to
update some cell information
--
BD3


"Chip Pearson" wrote:

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default I want a macro that can open a worksheet in a closed workbook

Hi bigdaddy3

You can change cells in different workbooks like this
http://www.rondebruin.nl/copy4.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"bigdaddy3" wrote in message ...
can i do that with a macro as i am using 3 different workbooks with sheet
tabs not showing and i dont want the whole workbook showing i just need to
update some cell information
--
BD3


"Chip Pearson" wrote:

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

jim,would i have to add that code after the initial code that calls up the
workbook ie workbooks.open(file path) then your code
--
BD3


"Jim Thomlinson" wrote:

Do you know the name of the sheet? If so then just open the book and
reference the sheet that you want.

dim wbk as workbook
dim wks as worksheet

set wbk = workbooks.open "C:'MyBook.xls"
set wks = wbk.Sheet1

wks is now referencing sheet1 in MyBook.
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I know jim but i want to reference certain cells in that sheet and i need to
be able to open it at that sheet not any other in the workbook
--
BD3


"Jim Thomlinson" wrote:

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

unfortunately not to much information needed
--
BD3


"Lowkey" wrote:

Is it possible to create a 4th workbook with a sheet containing the cells you
only want updated so the user doesn't see the other sheets or cells you don't
want them to, then link your updates to the 4th workbook?

"bigdaddy3" wrote:

can i do that with a macro as i am using 3 different workbooks with sheet
tabs not showing and i dont want the whole workbook showing i just need to
update some cell information
--
BD3


"Chip Pearson" wrote:

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3





  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default I want a macro that can open a worksheet in a closed workbook

That code opens the workbook referenced to the variable wbk. You indicate in
a later thread that you have three books to work with... The code will look
like this

dim wbkThis as workbook
dim wbkThat as workbook
dim wbkTheOther as workbook

set wbkThis = workbooks.open "C:\This.xls"
set wbkThat = workbooks.open "C:\That.xls"
set wbkTheOther = workbooks.open "C:\TheOther.xls"

This give you workbook objects that you can reference directly through your
code. Once created they will last for the balance of the procedure call. They
can also be passed to other procedure the same as any other variable. This
code will take the place of your file open code. Note the books can be closed
simply by addin the lines

wbkThis.close
wbkThat.close
wbkTheOther.close

--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

jim,would i have to add that code after the initial code that calls up the
workbook ie workbooks.open(file path) then your code
--
BD3


"Jim Thomlinson" wrote:

Do you know the name of the sheet? If so then just open the book and
reference the sheet that you want.

dim wbk as workbook
dim wks as worksheet

set wbk = workbooks.open "C:'MyBook.xls"
set wks = wbk.Sheet1

wks is now referencing sheet1 in MyBook.
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I know jim but i want to reference certain cells in that sheet and i need to
be able to open it at that sheet not any other in the workbook
--
BD3


"Jim Thomlinson" wrote:

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

thanks for that ill try it
--
BD3


"Jim Thomlinson" wrote:

That code opens the workbook referenced to the variable wbk. You indicate in
a later thread that you have three books to work with... The code will look
like this

dim wbkThis as workbook
dim wbkThat as workbook
dim wbkTheOther as workbook

set wbkThis = workbooks.open "C:\This.xls"
set wbkThat = workbooks.open "C:\That.xls"
set wbkTheOther = workbooks.open "C:\TheOther.xls"

This give you workbook objects that you can reference directly through your
code. Once created they will last for the balance of the procedure call. They
can also be passed to other procedure the same as any other variable. This
code will take the place of your file open code. Note the books can be closed
simply by addin the lines

wbkThis.close
wbkThat.close
wbkTheOther.close

--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

jim,would i have to add that code after the initial code that calls up the
workbook ie workbooks.open(file path) then your code
--
BD3


"Jim Thomlinson" wrote:

Do you know the name of the sheet? If so then just open the book and
reference the sheet that you want.

dim wbk as workbook
dim wks as worksheet

set wbk = workbooks.open "C:'MyBook.xls"
set wks = wbk.Sheet1

wks is now referencing sheet1 in MyBook.
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I know jim but i want to reference certain cells in that sheet and i need to
be able to open it at that sheet not any other in the workbook
--
BD3


"Jim Thomlinson" wrote:

Sheets are contained within books. You have to open the book to get the
sheet...
--
HTH...

Jim Thomlinson


"bigdaddy3" wrote:

I would like to write a macro that will open a particular worksheet in a
closed workbook that contains named sheets,when i use the application.open
route with the path details, i can get the whole book to open but i want a
particular sheet of that book. Can anyone help please
--
BD3

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default I want a macro that can open a worksheet in a closed workbook

thanks for that im going to try it
--
BD3


"Ron de Bruin" wrote:

Hi bigdaddy3

You can change cells in different workbooks like this
http://www.rondebruin.nl/copy4.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"bigdaddy3" wrote in message ...
can i do that with a macro as i am using 3 different workbooks with sheet
tabs not showing and i dont want the whole workbook showing i just need to
update some cell information
--
BD3


"Chip Pearson" wrote:

A worksheet must be contained within a workbook. There is no such
thing as a sheet without a containing workbook. You must open the
workbook and then go to the desired worksheet.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"bigdaddy3" wrote in
message
...
I would like to write a macro that will open a particular
worksheet in a
closed workbook that contains named sheets,when i use the
application.open
route with the path details, i can get the whole book to open
but i want a
particular sheet of that book. Can anyone help please
--
BD3






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
Open a closed workbook with VBA ttomlinson[_2_] Excel Programming 8 May 30th 05 06:53 PM
Open a closed workbook with VBA ttomlinson Excel Programming 0 May 29th 05 04:39 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM
Determine if Workbook is Open or Closed jurgenC![_2_] Excel Programming 2 December 28th 03 10:12 PM


All times are GMT +1. The time now is 04:49 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"