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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Office Component (Excel) Properties in Run-Time

Status
Not open for further replies.

PSUIVERSON

Technical User
Nov 6, 2002
95
US
I have a spreadsheet in my VB application that during run time after error-checking needs to have .enabled = FALSE. However I cannot find this property in code.

At design time the I can set the enabled property to false but I do not want to do this. I need the user to be able to use the EXCEL spreadsheet. Hit the ERROR CHECK button which will review the data in the spreadsheet and once approved I want the data to be locked before submission (So that they CAN NEVER submit the data through the application with errors).

This is the end of the code in which I am stumped as to what the property is.


...
Set rst2 = Nothing
Set rst = Nothing

MsgBox ("Your entry has been approved and can be submitted to the Master List.")

cmdSubmit.Enabled = True
cmdError.Enabled = False

**HERE IS WHERE I WANT TO PUT SOMETHING LIKE: shtEntry.enabled = FALSE**

...
 
Well PSU the answer is...

shtEntry.ActiveSheet.Protection.Enabled = True

There you go! ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top