ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Command Button when File name begins with Customer? (https://www.excelbanter.com/excel-programming/302438-disable-command-button-when-file-name-begins-customer.html)

RPIJG[_58_]

Disable Command Button when File name begins with Customer?
 
I want to put something into the workbook that disables the comman
button when the filename begins with the word customer...can I do this

--
Message posted from http://www.ExcelForum.com


Greg Koppel

Disable Command Button when File name begins with Customer?
 
Yes. At the start of your code for the button (which I assume finds a file)
add the following...

If Left('filename', 8) = "Customer" then Exit Sub

HTH, Greg

"RPIJG " wrote in message
...
I want to put something into the workbook that disables the command
button when the filename begins with the word customer...can I do this?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 05:29 PM.

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