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

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

قام بنشر

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

'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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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

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

Important Information