![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
I have 15 sheets in my Workbook and want to put code in the Workbook Open, the code works but I want the data to be entered on 5 different sheets in the same workbook with the same cell references. I have tried the
select method and it still only enters the data on one sheet. Can someone help? thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Post the code that you've tried.
oh, yeah, um,...please. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
If (Now() >= A109) Then
Workbooks("C Shift Time 4-15-02.xls").Worksheets("sup sample", "413 sample").Activate Range("B110") = 14 Range("I110") = 12 End If |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
You can change the names to whatever your sheetnames are and put this code within your "If" statement. HTH |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
Mark,
It says the Sub Script is out of range? |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Did you change the sheet names to your actual sheet names? i.e.Change "Sheet1", "Sheet2" and "Sheet3" to whatever the names of your sheets are. (plus add in the names of the other two sheets you've got).
If this code isn't getting placed in the actual workbook that these sheets are in, you'll also need to add in the ...Workbooks("blah blah") ...bit that you had in the original code. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|