Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to: Open closed workbook/Search data tables/Return data to open workbook | Excel Discussion (Misc queries) | |||
Open a closed workbook with VBA | Excel Programming | |||
Open a closed workbook with VBA | Excel Programming | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions | |||
Determine if Workbook is Open or Closed | Excel Programming |