Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control box/Command buttons Khanjohn Excel Programming 6 April 24th 07 10:02 PM
Control Pivot Table By Command Buttons [email protected] Excel Discussion (Misc queries) 0 March 21st 07 04:18 PM
Vanishing Control Toolbox Command Buttons Fritz24 Excel Discussion (Misc queries) 2 June 7th 05 01:39 PM
Command vs Control Buttons Robert Gibson Excel Programming 1 October 13th 03 04:49 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"