LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Cleaning up code

The following code works but I think could be improved.

Any suggestions would be appreciated!

Sub xxCodes()
Dim InpType As String
Dim tryagain As Long
startinput:
InpType = UCase(InputBox("Enter the school code"))
Select Case InpType
Case "XX1" To "XX5"
shtInput.Range("State_Code") = InpType
shtInput.Range("product") = ""
Case Else
tryagain = MsgBox("Do you want to try again", vbYesNo)
If tryagain = 6 Then
GoTo startinput
Else
End
End If
End Select
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cleaning up some code? Patrick[_14_] Excel Programming 3 August 16th 06 12:02 AM
Help Cleaning up Code Lost and Looking for Help Excel Programming 1 May 24th 06 02:26 PM
Need help Cleaning up Code Joel Mills Excel Programming 5 December 16th 04 10:36 PM
Help with shortening/cleaning some code please roy Excel Programming 3 June 3rd 04 11:49 PM
VBA Code -- Cleaning Data Craig[_8_] Excel Programming 2 December 12th 03 12:21 AM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"