Microsoft
Software
Hardware
Network
Question : I have this function, but unable to put results on the form
I want to put the results on a form. Msgbox displays the informatio, but do not know how to transfer the information to my form.
What do I need to do to get the results in my form?
Below is the code:
Option Compare Database
Private Declare Function OpenProcess Lib "Kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function GetExitCodeProcess Lib "Kernel32" (ByVal hProcess As Long, lpExitCode As Long) As Long
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long)
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Private Sub Shell32Bit(ByVal JobToDo As String)
Dim hProcess As Long
Dim RetVal As Long
hProcess = OpenProcess(PROCESS_QUERY_
INFORMATIO
N, False, Shell(JobToDo, vbHide))
Do
GetExitCodeProcess hProcess, RetVal
DoEvents: Sleep 100
Loop While RetVal = STILL_ACTIVE
End Sub
Function findit()
Dim b As String
Dim C As String
Dim D As String
If Dir("C:\tmpp.txt") <> "" Then Kill ("C:\tmpp.txt")
Shell32Bit "command.com /c ipconfig /all > C:\tmpp.txt"
Open "C:\tmpp.txt" For Input As #1
Do Until D = "1"
Line Input #1, b
C = Trim(b)
If Mid(C, 1, 16) = "Physical Address" Then
Line Input #1, b
MsgBox Mid(C, 36, 18)
D = "1"
End If
Loop
Close #1
'If Dir("c:\tmpp") <> "" Then Kill "c:\tmpp"
End Function
Answer : I have this function, but unable to put results on the form
when (on what event) do you want to show the value returned by the function?
me.hold=findit()
Random Solutions
Using Forms Stored in an Access Library Database
Crosstab Query with Decimal column Headers for MS Graph Datasheet
Using IF in SQL SELECT
Gating Role
Data Loss & Recovery - FAT 16 - NTFS 160GB USB drive. Possible bad MBR or Partition Table
how to schedule a daily task run stored procedure with sqlserver 2005
sql question
need to convert the following from asp to asp.net
XL Placing a value in an empty Cell with a Visual Basic Rprogram.
Alternative to "Can Grow" Property