Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default IF file name

This is easy but somehow I cant get it

I have a macro that I want to execute only if the workbook has a particualr
file name

so something like
If workbooks.name = " sample.xls" then
' do something
else
' do nothing
end if
end sub

however, what I found was that no matter what the file name, the macro still
goes ahead and get executed




 
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
excel file lost Vivek Excel Discussion (Misc queries) 4 January 5th 06 05:08 AM
Copy File Automatically on Opening It Dolores Excel Discussion (Misc queries) 4 December 30th 05 07:12 PM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 3rd 05 03:40 PM


All times are GMT +1. The time now is 10:00 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"