View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Checking data with a loop

Try this alternate

Sub macro2()
Dim Nummer As Integer

Worksheets("Sheet1").Activate

Do Until Nummer 0
Nummer = Application.InputBox("Doe eens een nummer", "Selecteren",
Type:=2)
Loop

With Range("B12").Font
.Name = "Arial"
.Size = Nummer
End With

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Syrus the Virus " wrote in
message ...
Hi,

I'm not the best programmer in the world and I'm in need of help. I was
trying to make a loop

Sub macro2()
Dim Nummer As String

Worksheets("Sheet1").Activate
Do Until Nummer 0
Nummer = Application.InputBox("Doe eens een nummer",
"Selecteren", Type:=2)
Exit Do
Loop
Range("B12").Select
With Selection.Font
Name = "Arial"
Size = Nummer
Strikethrough = False
Superscript = False
Subscript = False
OutlineFont = False
Shadow = False
Underline = xlUnderlineStyleNone
ColorIndex = xlAutomatic
End With

End Sub


But it did not work. I tried to check the input but it failed. And how
do I set borders (input between 10 and 30 (for example)

Tnxs in advanced.


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