Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Dim fd As FileDialog
  2. Set fd = Application.FileDialog(msoFileDialogOpen)
  3. Dim filename As String
  4. If fd.Show = -1 Then
  5. filename = fd.SelectedItems(1)
  6. MsgBox ("The path is: " & filename)
  7. Open filename For Input As #1
  8. i = 0
  9. Do Until EOF(1)
  10. Line Input #1, x
  11. y = Left(x, 1)
  12. Z = Replace(x, y, UCase(y))
  13.  
  14. a = ""
  15.  
  16. For i = 1 To Len(x)
  17.  
  18. y = Mid(x, i, 1)
  19.  
  20. If y = " " Then
  21. pos = i + 1
  22.  
  23. e = Mid(x, pos, 1)
  24. n = Replace(x, e, UCase(e))
  25.  
  26.  
  27.  
  28. End If
  29.  
  30. Next i
  31. a = a + n
  32.  
  33.  
  34. answ = a
  35.  
  36. MsgBox (answ)
  37.  
  38. Loop
  39. Print #1, answ
  40. Close #1
  41.  
  42. End If
  43. Set fd = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement