I followed the very helpful suggestion you posted at 04-28-2020 06:33 PM:
Quote:
Originally Posted by Guessed
We can't see which line is failing so we can't tell you where the issue is but the error is saying the object doesn't exist.
To find your lost item, put your report into a MsgBox instead of using a text file that you need to go and read using more macros.
Add a command button to your form and then press F7 to create the macro for it. Paste the following code into that macro
Code:
Dim ctlLoop As control, sMsg As String
sMsg = "Name, Top, Left" & vbCr
For Each ctlLoop In Me.Controls
sMsg = sMsg & ctlLoop.Name & ", " & ctlLoop.Top & ", " & ctlLoop.Left & vbCr
Next ctlLoop
MsgBox sMsg
Then display the form and click that button. It will display a list of the controls on the userform and their top and left position values. This should include your missing item and what its coordinates are.
|
I had to send the output (sMsg) to either the clipboard or a file because sMsg had 72 lines. I saved the clip to a csv file and then to the attached Excel file.
The coordinates of "txHyperlinkzName" are: .Top=162 and .Left=504
"txHyperlinkzName" is visible when I run the following:
Code:
Private Sub btnMoveTxtbox_Click()
Me.txHyperlinkzName.Top = 134
Me.txHyperlinkzName.Left = 24
Me.txHyperlinkzName.BackColor = &HC000&
End Sub
But "txHyperlinkzName" disappears when I close the form, presumably returning to those weird coordinates: .Top=162 and .Left=504
I spent almost the entire day today trying unsuccessfully to figure out how to get the userform, “frmTOE_ExhMakeFromData01”, to save those coordinates into the form, so that "txHyperlinkzName" is situated at those coordinates when I am editing the form.
I await your next suggestion.
And I would like to thank you again.
Marc