• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Dynmically Activate

vamshikrishna

New Member
I want to use the below code dynamically
Windows("Fujitsu Satisfaction Survey grouped by incident.xlsx").Activate
i mean, i want to set the filename in any cell of Excel and from that cell it has to window name, can it is possible
 
vamshikrishna
Paste next to ThisWorkbook
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    On Error Resume Next
    wsc = "Fujitsu Satisfaction Survey grouped by incident.xlsx"
    If Target.Value = wsc Then
        Windows(wsc).Activate
        If Err.Number <> 0 Then MsgBox "Cannot Activate File:" & Chr(13) & wsc, vbCritical, Err.Description
    End If
End Sub
 
Back
Top