![]() |
![]() |
|
|||||||
| 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: 2
|
I need to run data validation in a file saved as excel95. Is there anyone that knows how to construct a macro for this?
Show me how to collect a value when itīs being entered in a cell and how I can check if itīs a number or not. The rest i think I can handle... Greetings from Sweden! |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 2
|
I found this example but I canīt get it to work in my file. Does anyone have a clue?
------------------------------------------ The following sample macros restrict the data type in column C of sheet 1 to numbers. Sub Auto_Open() Sheets("Sheet1").OnEntry = "numbers" End Sub Sub numbers() If ActiveCell.Column = 3 And Not IsNumeric(ActiveCell.Value) Then MsgBox "Enter a number." ActiveCell.Value = "" ' Clears contents of active cell. End If End Sub http://support.microsoft.com/default...;en-us;Q141181 [ This Message was edited by: dansve on 2002-04-10 03:58 ] [ This Message was edited by: dansve on 2002-04-10 04:34 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|