View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tracey[_8_] Tracey[_8_] is offline
external usenet poster
 
Posts: 1
Default Beginner asking for advice

Help, what's wrong with this?

Sub manual_ta()


Dim newnum As Variant 'newnum for user-entered ta
Dim digits As Single 'digits used for capturing length of user entry


newnum = inputbox("What number would you like to assign to this TA
Click OK after entering number.", [TA number], vbOKCancel)


digits = Len(newnum)
If digits = 6 Then
Range("TA").ClearContents 'clear the old TA #
newnum = ActiveCell.Value 'paste the value of the user input into tha
cell if it is 6 digits in length

Else
Call question

End If


End Su

--
Message posted from http://www.ExcelForum.com