Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am using excel 2003 and have a workbook with 2 sheets and the code below in "ThisWorkbook". Private Sub Workbook_BeforePrint(Cancel As Boolean) Worksheets("Sheet1").Activate Worksheets("Sheet1").Select If Range("A1") = "" Then Cancel = True Range("A1").Select MsgBox ("Type in the missing data...") GoTo ExitNow End If ExitNow: End Sub If I leave cell A1 on Sheet1 blank, then click on Sheet2 and try to print, it will place the cursor onto Sheet1 cell A1 and if I immediately type a value and click enter, the value disappears from Sheet1 cell A1 and appears in Sheet 2 cell A1. Can anyone help? -- Thanks, Cassie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Event triggered in Excel's cell by DDE | Excel Programming | |||
Worksheet_Change event not triggered as expected | Excel Programming | |||
Macro triggered by an event | Excel Programming | |||
Event triggered by paste | Excel Programming | |||
Macro triggered by an event | Excel Discussion (Misc queries) |