Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking data with a loop
Hi,
I'm not the best programmer in the world and I'm in need of help. I wa 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 ho do I set borders (input between 10 and 30 (for example) Tnxs in advanced -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Checking Data in 2 spreadsheets | Excel Discussion (Misc queries) | |||
Checking for data duplications | Excel Discussion (Misc queries) | |||
Please HELP: Checking data | Excel Worksheet Functions | |||
Checking if a cell is filled up with data | Excel Discussion (Misc queries) |