Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

dlresize error

$
0
0

Hello,

 

I'm using the following macro below to call up the drresize function, but I'm getting an error (screenshot attached) when the code starts to execute line "call dlresize". To make the matters worse, I already have PIDLdialogs checked (activated) under Available References in VBA, so I shouldn't be getting this error. Can anyone help me resolve it, please?

 

----------------------------------------------------------------------------------------------------

Sub sizecells()
 
Dim iLoop As Integer
Dim rNa As Range
Dim y As Integer
Dim ws As Worksheet
 
 
For Each ws In Worksheets
With ws
ws.Activate
iLoop = WorksheetFunction.CountIf(Cells, "resize to show all values")
Set rNa = Range("A1")
 
 For y = 1 To iLoop
  Set rNa = Cells.Find(What:="resize to show all values", After:=rNa, _
             LookIn:=xlValues, LookAt:=xlWhole, _
             SearchOrder:=xlByRows, SearchDirection:=xlNext, _
             MatchCase:=False)
    If rNa Is Nothing Then GoTo 0
              rNa.Activate
      Call dlresize
      
Next y
0
 End With
 Next ws
 
Worksheets("Reservoir Voidage Replacement").Activate
 
MsgBox "New PI data has been refreshed"
 
End Sub
---------------------------------------------------------------------------------------------------------------------------
 
 

Attached Images

  • error.JPG
  • Object References.JPG

Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>