LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need "Filename Equals" code help.

Basically, I am running two message boxes that lead into the save as
menu every time the file S:\Mileage Reimbursement Form.xls is opened.

Once the user has saved the file on their own personal network drive
space, the message boxes and save as dialog still appear. I do not
want this to occur. I keep getting either "End if without Block If"
and error 424. How do I code for this? Thanks for any help you can
provide.

Private Sub Workbook_Open()
If Filename.equals("Mileage_Reimbursement_Form.xls") Then
MsgBox "Welcome to the mileage form. Please do not modify
this form in any way or it may not calculate your mileage correctly.
If you need additional rows, please click the 'New Row' button."
MsgBox "Before you start filling out this form, please
save a copy on your F: drive. You should name the file according to
the following format: (Your Name) MM/YYYY Mileage"
For Each wb In Workbooks
wb.Activate
Application.Dialogs(xlDialogSaveAs).Show

End If
Next

End Sub

 
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
Counting cells only if cell X equals "yes" Frustrated Excel Worksheet Functions 4 November 6th 09 05:59 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Sumif formula that uses "contains" rather than "equals" jerrymcm Excel Discussion (Misc queries) 4 October 2nd 07 05:15 PM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
Deleting Cells where content equals "0" or null bm4466[_6_] Excel Programming 0 August 3rd 06 07:16 PM


All times are GMT +1. The time now is 06:51 PM.

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"