View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RichardO[_11_] RichardO[_11_] is offline
external usenet poster
 
Posts: 1
Default macro was working, now it's not working

Hello all:

I have the following macro which on clicking YES, would run th
formatsummary which does some things to the "Summary" worksheet. The
it adds 1 workday to cell B4 of the "Summary" worksheet.

When I run the macro, I am getting a compiler error with (.Rang
highlighted in yellow.

Before I added the:

If MsgBox("Click Yes to refresh workbook", vbYesNo) = vbYess Then
...
End If

The macro worked okay, now it's not working fine.

Thanks for helping.



Private Sub Workbook_Open()
If MsgBox("Click Yes to refresh workbook", vbYesNo) = vbYess Then
formatsummary
With Worksheets("Summary").[b4] = workday(.Range("B4"), 1)
End With
End If
End Su

--
Message posted from http://www.ExcelForum.com