Michael Ziegler
New Member
- Joined
- Jul 2, 2019
- Messages
- 8
I created this for each loop to add the devices ip address to the shapes text it find the devices if i put a static name on the code but It doesn't look like is reading the worksheet names from column A
When I change the loop and write one of the shapes name on it I'm able to change any of the shapes names. But as is it doesn't seem to be reading the values from the worksheet and the worksheet is active and open.
Here is my code
I need the loop to be able to go thru column a and compare the values with the shape names and if it finds a match then change the name to the column a value plus the value from the corresponding cell in column c which is the device ip. Thanks
When I change the loop and write one of the shapes name on it I'm able to change any of the shapes names. But as is it doesn't seem to be reading the values from the worksheet and the worksheet is active and open.
Here is my code
Code:
For Each node In ActivePage.Shapes
If node.Text = Sheets("results").Cells(WhatRow, "A").Value Then
node.Text = Sheets("results").Cells(WhatRow, "A").Value &
Chr(13) & Chr(10) & "IP Address" & Chr(13) & Chr(10) & cel.Offset(0,
2).Value
WhichRow = WhichRow + 1
Else
End If
Next node