View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
terryvanduzee[_2_] terryvanduzee[_2_] is offline
external usenet poster
 
Posts: 1
Default Before macro runs - check workbook name


One way may be: Im only a newby and someone else may have a better
solution.

Add this code before the rest of your code.

If Not ThisWorkbook.Name = "CSRReport" & ".xls" Then
MsgBox "Please save this workbook as CSRReport.xls"
Else
'your code goes here
End If

Terry


--
terryvanduzee
------------------------------------------------------------------------
terryvanduzee's Profile: http://www.excelforum.com/member.php...o&userid=37004
View this thread: http://www.excelforum.com/showthread...hreadid=567286