S
stag5353
Hi, I'm relatively new to VB/Excel/etc... trying to figure this out.
I have a spreadsheet that is created by a LabView program. It includes
no formatting. I'd like to automatically format the spreadsheet when it
is opened... but I'd only like the formatting part of the macro to run
if the filename has a particular substring in it.
ex. filename: "1-27-04 Station1 Potassium.xls"
the macro would run and would format b/c in the path, the substring
"Station1" is there.
Is the best way to do this to set my macro as Auto_Open, then add a
condition at the beginning that parses the filename and runs the
formatting only if that substring is there? Does the Auto_Open macro
run whenever any Excel file is opened on that PC?
Any examples of how to search for a substring in the filename?
Is this even do-able? If it isn't I will have to succumb to the people
that make LabView and buy their $500 plug-in that does ActiveX
formatting and report-making. I'd rather do it simple and cheap if
possible.
Thanks a million in advance...
I have a spreadsheet that is created by a LabView program. It includes
no formatting. I'd like to automatically format the spreadsheet when it
is opened... but I'd only like the formatting part of the macro to run
if the filename has a particular substring in it.
ex. filename: "1-27-04 Station1 Potassium.xls"
the macro would run and would format b/c in the path, the substring
"Station1" is there.
Is the best way to do this to set my macro as Auto_Open, then add a
condition at the beginning that parses the filename and runs the
formatting only if that substring is there? Does the Auto_Open macro
run whenever any Excel file is opened on that PC?
Any examples of how to search for a substring in the filename?
Is this even do-able? If it isn't I will have to succumb to the people
that make LabView and buy their $500 plug-in that does ActiveX
formatting and report-making. I'd rather do it simple and cheap if
possible.
Thanks a million in advance...