اذهب الي المحتوي
أوفيسنا

تعديل كود للعمل من الوحدة النمطية


إذهب إلى أفضل إجابة Solved by kkhalifa1960,

الردود الموصى بها

تعديل كود للعمل من الوحدة النمطية
الكود الاصلى 
 

'Collecting Clock Speed (MHz)
Function Clock(strComputer) 

    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor") 
	
    For Each objItem in colItems
      'Wscript.Echo "Clock Speed: " & objItem.CurrentClockSpeed
      strResult = objItem.CurrentClockSpeed
    Next
	
    Clock = strResult
End Function

 

Clock.accdb

رابط هذا التعليق
شارك

هل هذا ما تريد ؟

  Function ProcessorSpeed()
' shows the processor name and speed of the computer
      Dim MyOBJ        As Object
      Dim cpu          As Object
      Dim strComputer  As String
      Set MyOBJ = GetObject("WinMgmts:").instancesof("Win32_Processor")
      For Each cpu In MyOBJ
            'MsgBox cpu.Name & " " & cpu.CurrentClockSpeed & " Mhz", vbInformation
      strComputer = cpu.CurrentClockSpeed
      Next
 ProcessorSpeed = strComputer
End Function

ايضا انظر في سطر الرسالة المعطل ان اردت اسم المعالج ايضا

Clock2.rar

رابط هذا التعليق
شارك

من فضلك سجل دخول لتتمكن من التعليق

ستتمكن من اضافه تعليقات بعد التسجيل



سجل دخولك الان
  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information