This worked. ThanksPrivate Sub SetTheFocus(Optional ByRef oTextBox As TextBox)
If IsMissing(oTextBox) Then
Exit Sub
Else
oTextBox.SetFocus
End If
End Sub
In a sub I have an optional parameter declared As TextBox.
How can I check to see if anything was passed to this parameter?
I've tried IsEmpty, IsNull and others and nothing has worked.
If a textbox name is passed, then I want to SetFocus to that textbox (which works when I do pass it a valid...
I did a forum search on DataGrid and found 80 posts. None of them had any replies, so I'm not real confident about this one, but what the heck.
Is it possible to edit data displayed in a datagrid on the grid itself?
I can click on a cell, display the text portion in a textbox, write the...
I've managed to put together the code to find and hightlight a word in a richtextbox, but it will only do it once. I need to find, and highlight, all instances of the word, and I'm getting nowhere fast. What modifications do I need to make to this?Dim strWord As String
Dim lPos As Long...
Thank you for your response. It probably is a good habit to get into. However, my question remains: If you are going to pass a parameter byref, then you don't have to do anything but create the parameter, right? You do not explicitly need to type in ByRef, correct?
Is it my understanding that parameters are, by default, passed ByRef. So, with that in mind, why do some people actually type in ByRef?
Example:Private Sub Whatever(ByRef strString As String)
'is exactly the same as
Private Sub Whatever(strString As String)Correct?
I can programmatically connect to a server, or another PC in my LAN, and run a program located on that machine. However, it will display on my console.
Is it possible to programmatically execute a program on a remote machine and have the screens for that program appear on the remote console?
When doing Adodc1.Recordset.Delete I get the following error:
"Multiple-steps operations generated errors. Check each status value."
What does that mean?
I need to rename a table in an Access database (this is an import database that gets shipped to us once a week, and for reasons too lenghty to go into, I have to rename one of the tables before I can process that data in it.) Here is what I have:Dim ADOCn As ADODB.Connection
Dim ConnString As...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.