Code:
Sub FormatTextAsNumbers()
Dim Col As Range
Set Col = Application.InputBox("Please select a column...", Type:=8)
Set Col = Columns(Col.Cells(1).Column)
Col.NumberFormat = "General"
Col.NumberFormat = "0.00"
End Sub
Rick,
The Input box works great now however, the little green tick marks that signify text is stored as a number do not seem to disappear when I test the code. Am I doing somthing wrong? I am using the code in conjunction with this other code but i do not think it would effect the result... :
Code:
Sub MacroShortcutList()
'Standard Module code!
'Display pick list box.
Dim Message, Title, Default, MyPick
'Set prompt.
'Add other macros to list with & Chr(13) & "Macro Name"
Message = "Select the number of the macro you want to run:" & Chr(13) & _
"1. Select No Macro" & Chr(13) & "2. Run Cost Analysis at 50%" & Chr(13) & "3. Customer Service Report" & Chr(13) & "4. Delete Rows Based On Criteria" _
& Chr(13) & "5. Insert Piedmont Logo" & Chr(13) & "6. Run Flat Rate Cost Analysis" & Chr(13) & "7. Format Text to Numbers"
'Set title.
Title = "Select a Macro to run!"
'Set default.
Default = "1"
'Display message, title, and default value.
MyPick = InputBox(Message, Title, Default)
'Optional, control box position!
'Display dialog box at position 100, 100.
'MyPick = InputBox(Message, Title, Default, 100, 100)
Select Case MyPick
Case 1
MsgBox "No Macro Selected!"
'Add additional Case code as needed!
Case 2
Call RunCostAnalysisFifty
Case 3
Call CustomerServiceReport
Case 4
Call DeleteRowsCriteria
Case 5
Call PiedmontLogo
Case 6
Call RunCostAnalysisFlatRate
Case 7
Call FormatTextAsNumbers
Case Else
Exit Sub
End Select
End Sub
Bookmarks