Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If and Then to Lock Combo Box in Excel

Status
Not open for further replies.

njwcad

Technical User
Oct 16, 2002
156
0
0
GB
Can anyone help

Is it possible to lock a combo - box in excel based on an if statement when a worksheet is opened

For example

On open
If A1 > 0 then lock Combo Box

Can someone advise suitable code for achieving this

Many Thanks
 


Hi,

Right click the sheet tab.

View/Project Explorer

Select the ThieWorkbook object

Click the Object dropdown and select Workbook.

Select OPEN in the Procedures drop down.

The Workbook_Open event is where you can run your code.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Skip

Thats great and many thanks - unfortunately I am an extreme novice and not sure exactly what the code should be


Thanks
 



Do you know how to lock the object?

Turn on your macro recorder and go thru the steps of doing it.

Post back with your recorded code if you need help.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top