#1   Report Post  
Jeff
 
Posts: n/a
Default Running VBA Macro

Hello,

It is possible to trigger a VBA macro that would run automatically every
time the workbook "A" is open, if the date in Workbook "A" in row D15 is
equal to the date in Workbook "B" E5?

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Sub Auto_Open()
Dim wb As Workbook

On Error Resume Next
Set wb = Workbooks("Workbook B.xls")
On Error GoTo 0
If wb Is Nothing Then
MsgBox "Workbook B not open"
Else
If ThisWorkbook.ActiveSheet.Range("D15").Value = _
wb.ActiveSheet.Range("E5").Value Then
'run macro
End If
End If
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
Hello,

It is possible to trigger a VBA macro that would run automatically every
time the workbook "A" is open, if the date in Workbook "A" in row D15 is
equal to the date in Workbook "B" E5?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM
running totals in a macro for each month idunnobutheregoes Excel Worksheet Functions 1 November 8th 04 10:35 PM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"