View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Incidental Incidental is offline
external usenet poster
 
Posts: 226
Default Error on input box

Hi Jamie

you could try passing the text field of the input box to a string then
check the string to see if it holds a value

Option Explicit
Dim InputStr As String ' declare a string

Sub NewWS()

Sheets("Temp").Select
Sheets("Temp").Copy After:=Sheets("database")
Sheets("Temp (2)").Select
InputStr = InputBox("Please input Sample Name for Retest ") 'pass
the input box value to the string
If InputStr = "" Then ' check if the value is empty if so end the
sub
Exit Sub
Else ' continue with your code
Sheets("Temp (2)").Name = InpStr

ActiveSheet.Range("F5").Value = InputBox("What was the Original
Concentration?")


ActiveSheet.Range("E3").Font.Bold = False


ActiveSheet.Range("E3").Value = ActiveSheet.Name


ActiveSheet.Range("E3").Characters(1, 5).Font.Bold = True
ActiveSheet.Range("E3").Select
ActiveCell.Font.Size = 14

End If
End Sub


hope this helps

S