From: Eric on 11 Feb 2010 10:24 The following code is stored under specific worksheet, whenever the worksheet is opened, it required to update all links and do all the calculation for each cells. For the given code, it requires to manually press F2 and enter to update and trigger the rest of coding. However, the value within cell A1 is calculated by formula, without manually pressing, the rest of coding will not be performed without triggering cell A1, so does anyone have any suggestions on how to trigger the rest of coding without manually update the A1 cell's value? Thank everyone very much for any suggestions Eric If Target.Address = "$A$1" Then On Error Resume Next Set myPic1 = ActiveSheet.Pictures("PicAtB10") Set myPic2 = ActiveSheet.Pictures("PicAtE10") Set myPic3 = ActiveSheet.Pictures("PicAtH10") On Error GoTo 0 If Not myPic1 Is Nothing Then myPic1.Delete If Not myPic2 Is Nothing Then myPic2.Delete If Not myPic3 Is Nothing Then myPic3.Delete
From: Phil Hibbs on 11 Feb 2010 12:04 If I understand you right, you want the Worksheet_Change sub to be called when the workbook opens? Just remove the "Private" from the declaration, then make a Workbook_Open sub in the ThisWorkbook code area like this: Private Sub Workbook_Open() Sheet1.Worksheet_Change ([A1]) End Sub Phil Hibbs.
|
Pages: 1 Prev: Value of wdAlertsNone Next: During VBA waiting for Message box answer problem |