home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2000 February / PCW_2_2000.ISO / software / prx / tipps / grokln.exe / GROSSKLEIN.BAS
Encoding:
BASIC Source File  |  1999-11-16  |  627 b   |  30 lines

  1. Sub GroKlei
  2. ActiveWindow.SelectWord : sText=ActiveWindow.SelectionText
  3. Select Case sText
  4. Case LCase(sText)
  5.  sText=UCase(Left$(sText,1)) + Right$(sText, Len(sText)-1):Selection.Insert sText
  6.  Exit Sub
  7. Case UCase(sText)
  8.  strConvert (stext,0)
  9.  Exit Sub
  10. End Select
  11. If Left(sText,1) = UCase(Left(sText,1)) Then
  12. strConvert (stext,1)
  13. Exit Sub
  14. Else
  15. strConvert(stext, 0)
  16. End If
  17. End Sub
  18. Sub strConvert (cText As String, Flag As Integer) 
  19. For I = 1 To Len(cText)
  20. If Flag=1 Then
  21. Mid( cText ,I, 1, UCase(Mid(cText,I,1))
  22. Else
  23. Mid( cText ,I, 1, LCase(Mid(cText,I,1))
  24. End If
  25. Next I
  26. Selection.Insert cText
  27. End Sub
  28.  
  29.  
  30.