Jump to content
Sign in to follow this  
ScriptCrafter

If ExcelFile Name is "NAME" question

Recommended Posts

ScriptCrafter

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
ScriptCrafter

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
contrex

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.