The runtime error -2147217396 (8004100c) keep occurs once i attempt to run this code to get the received signal strength of my WLAN card from WMI by using VB6 in Windows Vista. So is there any solution to solve this automation error ? Is VB6 cant access to certain WMI function in Windows Vista?
Private Sub Command1_Click() strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM MSNdis_80211_ReceivedSignalStrength", , 48) For Each objItem In colItems Text1 = objItem.Ndis80211ReceivedSignalStrength Next End Sub
Thanks in advance
Edited 6 Years Ago by Nick Evan: Added CODE-tags