D
DataFreakFromUtah
No question here, just a couple of procedure examples for the archive.
GET VALUES OF OLEObjects on worksheet
GET NAMES OF OLEObject Names on worksheet
Search criteria: Loop through OLEObjects and get values
Return OLEObjects values
List OLEObject Values List OLEObjects values
Get OLEObjects Values
Return OLEObjects names Get OLEOBjects names
OLEObjects name return OLEBObjects values return
Sub OLEObjectNamesReturn()
'Return all or any OLEObjects names to VB message box
Dim oleObj As OLEObject
For Each oleObj In ActiveSheet.OLEObjects
If TypeOf oleObj.Object Is MSForms.HTMLText Then
MsgBox "HTMLText: " & oleObj.Name
End If
Next
End Sub
Sub OLEObjectValueReturn()
'Return any or all OLEObjects values on active worksheet to active worksheet
Dim oleObj As OLEObject
For Each oleObj In ActiveSheet.OLEObjects
If TypeOf oleObj.Object Is MSForms.HTMLText Then
' MsgBox "HTMLText: " & oleObj.Object.Value
ActiveCell.Value = oleObj.Object.Value
ActiveCell.Offset(1, 0).Select
End If
Next
End Sub
GET VALUES OF OLEObjects on worksheet
GET NAMES OF OLEObject Names on worksheet
Search criteria: Loop through OLEObjects and get values
Return OLEObjects values
List OLEObject Values List OLEObjects values
Get OLEObjects Values
Return OLEObjects names Get OLEOBjects names
OLEObjects name return OLEBObjects values return
Sub OLEObjectNamesReturn()
'Return all or any OLEObjects names to VB message box
Dim oleObj As OLEObject
For Each oleObj In ActiveSheet.OLEObjects
If TypeOf oleObj.Object Is MSForms.HTMLText Then
MsgBox "HTMLText: " & oleObj.Name
End If
Next
End Sub
Sub OLEObjectValueReturn()
'Return any or all OLEObjects values on active worksheet to active worksheet
Dim oleObj As OLEObject
For Each oleObj In ActiveSheet.OLEObjects
If TypeOf oleObj.Object Is MSForms.HTMLText Then
' MsgBox "HTMLText: " & oleObj.Object.Value
ActiveCell.Value = oleObj.Object.Value
ActiveCell.Offset(1, 0).Select
End If
Next
End Sub