ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   For Tom Ogilve re File check (https://www.excelbanter.com/excel-programming/373655-tom-ogilve-re-file-check.html)

Matilda

For Tom Ogilve re File check
 
Hi Tom,

Thankyou for your reply to my post
Checking if active file is correct version

I tried to reply but my browser won't co-operate, and I certainly didn't
wish to appear ungrateful!

Such a simple solution that has been eluding me for hours - at least the
syntax has.

This now works exactly as i wanted:


Public Function checkActiveFilename(sOpenFileName) As Boolean
Dim sNewFile As String
sNewFile = "C:\NewFolder\NewFile\"
If ActiveWorkbook.Path = sNewFile Then
checkActiveFilename = False
End If
End Function

Many thanks,

Matilda

Tom Ogilvy

For Tom Ogilve re File check
 
Your welcome. Glad it worked out.
--
Regards,
Tom Ogilvy


"Matilda" wrote:

Hi Tom,

Thankyou for your reply to my post
Checking if active file is correct version

I tried to reply but my browser won't co-operate, and I certainly didn't
wish to appear ungrateful!

Such a simple solution that has been eluding me for hours - at least the
syntax has.

This now works exactly as i wanted:


Public Function checkActiveFilename(sOpenFileName) As Boolean
Dim sNewFile As String
sNewFile = "C:\NewFolder\NewFile\"
If ActiveWorkbook.Path = sNewFile Then
checkActiveFilename = False
End If
End Function

Many thanks,

Matilda



All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com