G
Guest
I have a TextBox on a form. At times, I want my VBA code to copy a string
into this TextBox. So far, the only way I have been able to do this is by
temporarily setting focus to this TextBox. My code looks basically like this:
MyTextBox.SetFocus
MyTextBox.Text = MyStringVariable
MyOtherControl.SetFocus
This works, but my problem is that I don't want this TextBox to be visible
and I do not want it to be a TabStop. Whenever I set the TextBox Visible and
Tabstop properties to "No", my code no longer works. I think this is because
focus can no longer be set to the TextBox.
Is there another way that I can manipulate the text in a TextBox without
setting focus to it? Or, is there a way that I can hide this TextBox from my
users without setting the Visible and Tabstop properties to "No"?
Thanks,
Paul
into this TextBox. So far, the only way I have been able to do this is by
temporarily setting focus to this TextBox. My code looks basically like this:
MyTextBox.SetFocus
MyTextBox.Text = MyStringVariable
MyOtherControl.SetFocus
This works, but my problem is that I don't want this TextBox to be visible
and I do not want it to be a TabStop. Whenever I set the TextBox Visible and
Tabstop properties to "No", my code no longer works. I think this is because
focus can no longer be set to the TextBox.
Is there another way that I can manipulate the text in a TextBox without
setting focus to it? Or, is there a way that I can hide this TextBox from my
users without setting the Visible and Tabstop properties to "No"?
Thanks,
Paul