S
Steve Rindsberg
I read some of your seminars about VB on your website - pretty interesting..
I guess I'm getting a bigger picture, little by little..
Thanks ... it does take a while if you're starting from scratch.
1. BACKSPACE key issue. I have created a new module with the last code you
gave me, named it "Backspace" and assigned it to the BACKSPACE "key" shape.
Now this "key" doesn't type this word in the textbox, nothing happents, and
it doesn't delete the last character.
Pesky aircode. Try this instead, and for extra credit, tell me why it works better than the original <G>.
Sub PseudoKeyboard(oSh As Shape)
Dim strShapeText As String
strShapeText = oSh.TextFrame.TextRange.Text
With ActivePresentation.Slides(1).Shapes("TextBox1")
With .OLEFormat.Object
Select Case oSh.TextFrame.TextRange.Text
Case Is = "Backspace"
' delete the last character
.Text = Left$(.Text, Len(.Text) - 1)
Case Else
.Text = .Text & strShapeText
End Select
End With
End With
End Sub
2. SAVE button issue. I read thru your "Geberal Purpose..." and did it all.
When I press F5 - the notepad pops-up with the text I inserted in the code,
and it sends it to the TEMP folder. 1) But it's all happening in VB, not on
the presentation. 2) Now, how to give the button SAVE a command to send the
text typed in the textbox right to that TEMP folder, without popping-up
anywhere, and emptying the text box?
Assign its click action as Run Macro: SaveMe
Sub SaveMe()
' ALL ON ONE LINE:
Call WriteStringToFile("C:\Temp\BlahBlah.txt",
ActivePresentation.Slides(1).Shapes("TextBox1").OLEFormat.Object.Text)
' Substitute the path/file.ext you want to use above
End Sub
Sub WriteStringToFile(pFileName as String, pString as String)
Dim intFileNum as Integer
intFileNum = FreeFile
Open pFilename For Output As intFileNum
Print #intFileNum, pString
Close intFileNum
End Sub