S
Simon
EXCEL 2002
My workbook is used to calculate and then print out bills
for each room in our hotel of six rooms. Thus I have seven
worksheets, six identical worksheets being one for each
room (named 101,102,103 etc), and a seventh sheet (named
CustCopy) being the actual printed out page that we give
to the customer.
I have a command button on each of the six "room" sheets
which when clicked prints out the seventh sheet. The
command button VB is
Private Sub CommandButton2_Click()
Sheets(Array("102", "CustCopy")).Select
Sheets("102").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("102").Select
End Sub
obviously this is the command button on our worksheet for
room 102.
At the moment the cell references on the CustCopy sheet
refer only to the room 101 sheet, for example a cell
thereon is
='101'!C6
so this duly prints out the contents of cell C6 on
worksheet 101, and always will regardless of which
actual "room" worksheet we are actually on. Is there some
way to make the cells on this worksheet reference the
cells from the room worksheet we're actually trying to
print from? I tried for example to change the cell
references in the CustCopy sheet to e.g.
=[ActiveWindow]!C6
but no joy.
I appreciate that I could just create a
designated "printout" sheet for each room worksheet but
that is very unwieldy.
Thanks very much if someone has the answer.
Simon
My workbook is used to calculate and then print out bills
for each room in our hotel of six rooms. Thus I have seven
worksheets, six identical worksheets being one for each
room (named 101,102,103 etc), and a seventh sheet (named
CustCopy) being the actual printed out page that we give
to the customer.
I have a command button on each of the six "room" sheets
which when clicked prints out the seventh sheet. The
command button VB is
Private Sub CommandButton2_Click()
Sheets(Array("102", "CustCopy")).Select
Sheets("102").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("102").Select
End Sub
obviously this is the command button on our worksheet for
room 102.
At the moment the cell references on the CustCopy sheet
refer only to the room 101 sheet, for example a cell
thereon is
='101'!C6
so this duly prints out the contents of cell C6 on
worksheet 101, and always will regardless of which
actual "room" worksheet we are actually on. Is there some
way to make the cells on this worksheet reference the
cells from the room worksheet we're actually trying to
print from? I tried for example to change the cell
references in the CustCopy sheet to e.g.
=[ActiveWindow]!C6
but no joy.
I appreciate that I could just create a
designated "printout" sheet for each room worksheet but
that is very unwieldy.
Thanks very much if someone has the answer.
Simon