linxaddict
New Member
- Joined
- Oct 14, 2013
- Messages
- 10
I have the Forms 2.0 Object Library loaded.
I have a value in a string variable (strNum)
I have a new form data object (doNum)
when I use:
Locals window tells me that doNum = <no Variables="">
so the rest of my code doesn't work.
I do nothing except re-run the same macro and then it ALL works.
Why or how is doNum not being set the first time through? Would it matter that the first time through I am pasting into the input box from the clipboard (copying from another data source into the clipboard)?
TIA,
linxaddict</no>
I have a value in a string variable (strNum)
I have a new form data object (doNum)
when I use:
Code:
Dim doNum As New MSForms.DataObject
Dim strNum As String
Dim strMessage, strTitle
'Input box to prompt for opers to query data
strMessage = "Enter Numbers."
strTitle = "Numbers"
strNum = InputBox(strMessage, strTitle)
If strNum <> "" Then
doNum.SetText strNum
doNum.PutInClipboard
Else
MsgBox "You did not enter any numbers. Please rerun 'Get Data'"
Application.StatusBar = False
Exit Sub
End If
Locals window tells me that doNum = <no Variables="">
so the rest of my code doesn't work.
I do nothing except re-run the same macro and then it ALL works.
Why or how is doNum not being set the first time through? Would it matter that the first time through I am pasting into the input box from the clipboard (copying from another data source into the clipboard)?
TIA,
linxaddict</no>