Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form buttons and Control Command Buttons
I was using a button on a worksheet put in using the forms toolbar.
Everything was working fine. I needed to change the buttons to Command Buttons using the controls toolbox so that I can change the properties on them. I used the procedure used by the form button for the command button by using the 'call addestimateitem'. I got an error on the following part of the code: With ycell.Validation .Delete .Add Type:=xlValidateDecimal, AlertStyle:=xlValidAlertStop, Operator _ :=xlGreater, Formula1:="-9000000" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "Error" .InputMessage = "" .ErrorMessage = "Must be an Amount." .ShowInput = True .ShowError = True End With I got an error message method 'Add' of object 'Validation' failed. This code worked fine with the form button. I tried putting ycell.select before the code and that stopped the error. I then got an error message method 'Range' of object '_worksheet' failed. on this line Range(xcell.Offset(1, 0), xcell.Offset(estnum, 0)).Name = "estdbnorng" Any Ideas on how I can fix this? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Control box/Command buttons | Excel Programming | |||
Control Pivot Table By Command Buttons | Excel Discussion (Misc queries) | |||
Vanishing Control Toolbox Command Buttons | Excel Discussion (Misc queries) | |||
Command vs Control Buttons | Excel Programming | |||
Control Buttons vs. Command Buttons | Excel Programming |