Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oh ye of little faith
Sub TestFile() Dim sFile As String Dim myFile sFile = "G:\Assets\test.doc" myFile = Dir(sFile) ActiveSheet.CommandButton1.Visible = Not myFile = "" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Ryan" wrote in message ... I don't think that what I am proposing to do is possible, but it is worth a shot (and will make my boss happy which is always a good thing). I want to be able to set a condition for the visibility of a command button. I want the button hidden unless there is a certain file in a certian drive. I have yet to be given the specifics on what the file will be and where it wil be, so for now I will call the file "test.doc" and the location "G:\Assets\". When "test.doc" is in "G:\Assets\" I want CommandButton1 on Sheet1 to be visible. When "test.doc" is NOT in "G:\Assets\" I want CommandButton1 to NOT be visible. Thanks for your help! Ryan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob
I will never doubt your powers again! Thank you Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
command button add another command | Excel Discussion (Misc queries) | |||
Visibility of a command Button | Excel Programming | |||
Command Button Visibility Problem | Excel Programming | |||
Command Button vs Control Button | Excel Programming | |||
Command Button vs Form Button | Excel Programming |