mysticmario
Active Member
- Joined
- Nov 10, 2021
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
Hi,
I used this code previously on with anoterh application, when i tried to replicate this for new usage I get the reference isnt valid error and for the love of god I cannot get it to work
here's the code:
Any Idea why this happens?
I used this code previously on with anoterh application, when i tried to replicate this for new usage I get the reference isnt valid error and for the love of god I cannot get it to work
here's the code:
VBA Code:
Dim Ws As Worksheet, lrQ As Long
Dim wb As Workbook
Set wb = ThisWorkbook
Dim adressn As String
For Each Ws In Worksheets
If InStr(Ws.Name, "Witold_") Then
adressn = Ws.Name
Set Ws = wb.Worksheets(adressn)
lrQ = 6
Sheets("PANEL WYCEN").Cells(lrQ + 1, "Q").Hyperlinks.add Anchor:=Sheets("PANEL WYCEN").Cells(lrQ + 1, "Q"), Address:="", SubAddress:=adressn & "!A1", TextToDisplay:=adressn
lr = lr + 1
End If
Next Ws