Sign in to follow this  
Followers 0
ScriptCrafter

If ExcelFile Name is "NAME" question

3 posts in this topic

Hello,

Is there a way to cross reference an ExcelFile name.

I have tried several derivitives of If Then trying to match an Excel file that has been opened and stored to a variable and nothing seems to work.

Im looking for somehting like

If ExcelFileName = "FILE.csv" Then
msgbox (0, "HI" "YOU GOT IT")
else
msgbox (0, "BYE" YOU DIDNT")
EndIf

Thank You

Share this post


Link to post
Share on other sites



Hello,

Is there a way to cross reference an ExcelFile name.

I have tried several derivitives of If Then trying to match an Excel file that has been opened and stored to a variable and nothing seems to work.

Im looking for somehting like

If ExcelFileName = "FILE.csv" Then
msgbox (0, "HI" "YOU GOT IT")
else
msgbox (0, "BYE" YOU DIDNT")
EndIf

Thank You

BUMP because I am still stuck ;)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I found 4 errors in your code. 1 missing dollar sign, 2 missing commas, 1 missing quote. So look at your code.

Edited by contrex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0