ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vb help (https://www.excelbanter.com/excel-programming/325838-vbulletin-help.html)

Hal[_3_]

vb help
 
I have the following line in my macro: Windows("rep.xls").Activate
I want to have a message box appear if the file is not open to say "please
open rep.xls"
I dont want the macro to open the file as the user will need to run another
macro to create it.
using xlm the code it would read:
=ERROR(FALSE)
=ACTIVATE("rep.xls")
=IF(A2=FALSE)
=ALERT("Please open rep.xls")
=END.IF()
=ERROR(TRUE)

Could anybody let me know the vb code for the above
Many Thanks
Hal



Bob Phillips[_6_]

vb help
 
Can we do it in VBA?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Hal" wrote in message
.co.uk...
I have the following line in my macro: Windows("rep.xls").Activate
I want to have a message box appear if the file is not open to say "please
open rep.xls"
I dont want the macro to open the file as the user will need to run

another
macro to create it.
using xlm the code it would read:
=ERROR(FALSE)
=ACTIVATE("rep.xls")
=IF(A2=FALSE)
=ALERT("Please open rep.xls")
=END.IF()
=ERROR(TRUE)

Could anybody let me know the vb code for the above
Many Thanks
Hal






All times are GMT +1. The time now is 01:15 AM.

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