Hey Red
"aparently" is spelled "apparently".
Where is the keyword that Creeper is using as a variable? Are you referring to the (year) he uses as an integer? If so, its not keyword, it’s a function when used like . . .
MsgBox Year(Now)
Point being, anyone can post...
I’m using the File System Object with a (File) object / variable. After instantiating the File object I see what appears to wrong dates being returned from the DateCreated property and DateLastModified property. The DateCreated property is returning a date that’s more recent than the...
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Sub Form_Load()
Dim sUserID As String
Dim sUserIDFromUser As String
Dim iLen As Integer
sUserID = Space$(100)
iLen...
The Lock Window Update API call will eliminate annoying flickering. Your code will execute quicker too. It won’t have the overhead of updating refreshing the control.
Option Explicit
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Private Sub...
There is an API Function called CopyFile. It copies a file from one location to another. One cold use VB's FileCopy Statement too. Its easier to use than the CopyFile API Function.
Option Explicit
Private Sub Form_Load()
Dim sTargetString As String
Dim sParsedArrayAllRecords() As String
Dim sParsedArraySingleRecords() As String
Dim sID As String
Dim iCountAllRecords As Integer
Dim iCountSingleRecord As Integer
sTargetString = "John Frederick Doe, Customer...
Here is an example of how to obtain an exit code. It uses Notepad.exe in this sample. Both Notepad and the vb app are running on the same PC.
Copy the code below into a form module with a command button named Command1
Option Explicit
Const NORMAL_PRIORITY_CLASS As Long = &H20
Private Type...
Shooting from the hip. . . I would say it is actually being added but the filter may be making it look like its not there. In order for me to know for sure one would need to know the value of the <filtervalue> variable. Would also need to know what the actual value for is <string VALUE>...
I stumbled across a way to disable / enable controls based on two text strings being the equal. In the sample below, Command1’s click enable the label. Cammand2 disabled the label. Does anyone see anything wrong with this approach? Some of the other programmers I work with don’t trust it...
If you add the Microsoft Comm Control you your toolbar you can drop the control off on a form and use it to communicate with a modem. From within the form module you can use methods / properties below to send commands etc to your modem
Me.MSComm.Settings = “9600,E,7,1”
Me.MSComm.CommPort = 1...
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.