I'm trying to run a macro but I'm getting a run-time error - and it highlights the If..Then statement in the following code. Anyone know what its talking about when the error says "Object doesn't support this property or method"?
Thanks in advance for any help,
ieJason W
Here's the code:
Function Flag(x As Shape)
Dim outputcounter As Integer
Dim shpe As Shape
Dim Section As String
Dim WellboreParameter As String
Dim FutureFormationDamage As String
Dim ChemicalSelection As String
Set shpe = x
If shpe = ActiveSheet.Shapes("Carbonate") Or _
shpe = ActiveSheet.Shapes("PotassicSS") Or _
shpe = ActiveSheet.Shapes("IronSS") Or _
shpe = ActiveSheet.Shapes("SwellingSS") Or _
shpe = ActiveSheet.Shapes("MobileSS") Or _
shpe = ActiveSheet.Shapes("HgInFormation") Or _
shpe = ActiveSheet.Shapes("HighTemp") Or _
shpe = ActiveSheet.Shapes("LowTemp") Or _
shpe = ActiveSheet.Shapes("OilWet") Then
Section = WellboreParameter
End If
Thanks in advance for any help,
ieJason W
Here's the code:
Function Flag(x As Shape)
Dim outputcounter As Integer
Dim shpe As Shape
Dim Section As String
Dim WellboreParameter As String
Dim FutureFormationDamage As String
Dim ChemicalSelection As String
Set shpe = x
If shpe = ActiveSheet.Shapes("Carbonate") Or _
shpe = ActiveSheet.Shapes("PotassicSS") Or _
shpe = ActiveSheet.Shapes("IronSS") Or _
shpe = ActiveSheet.Shapes("SwellingSS") Or _
shpe = ActiveSheet.Shapes("MobileSS") Or _
shpe = ActiveSheet.Shapes("HgInFormation") Or _
shpe = ActiveSheet.Shapes("HighTemp") Or _
shpe = ActiveSheet.Shapes("LowTemp") Or _
shpe = ActiveSheet.Shapes("OilWet") Then
Section = WellboreParameter
End If