![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 24
|
can i fix a cell (B4) so that it could only receive numeric number and the length is 8. how to do it in excel macro? pls help.
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
You don't need a macro. Go to the Data menu and choose Validation. Check out all of the options there.
__________________
~Anne Troy |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Range("b4").Select
With Selection.Validation .Delete .Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _ Operator:=xlLess, Formula1:="99999999" .IgnoreBlank = True .InCellDropdown = True .InputTitle = Warning .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With Try this, it should work goodluck- Todd |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|