Example 10 - editor.swb

' ******************************************************************************
' EDITOR.SWB
'
' 01/22/2000 by Joe Jones	joe@nhcad.com
' 
' New Hampshire CAD	   www.nhcad.com
'
' This macro is designed to aid in building text using special characters.
' Ultimately you will have to copy and paste the text into an anotation or
' you can use it as a value of a custom property.
'
' Pressing OK button will insert a "Carriage Return" into your text string
' Pressing OK or CANCEL twice will end the program
' ******************************************************************************
Dim I As Integer
Dim J As Integer
Dim dataStr As String
Dim buildStr As String
Dim tempStr As String
Dim Done As Boolean

Sub main() 
	buildStr = ""
	dataStr = "OK for Line Break" + Chr(13)
        dataStr = dataStr + "Use ALT + Keypad for special characters"	+ Chr(13)
	dataStr = dataStr + "171 = " + Chr(189) + "      172 = " + Chr(188) + _
                      "      241 = " + Chr(177) + Chr(13)
	dataStr = dataStr + "250 = " + Chr(183) + "      253 = " + Chr(178) + _
                      "      248 = " + Chr(186)+ Chr(13)
	Done = False

	While Not Done
		tempStr = buildStr
		buildStr = InputBox(dataStr, "Editor Special Characters", tempStr)
		If buildStr = tempStr Then
			Done = True
		Else
			If buildStr <> "" Then buildStr = buildStr + Chr(13)
		End If
	Wend
End Sub