Setting workheet object variable [Closed]

Report
Posts
6
Registration date
Monday October 24, 2016
Status
Member
Last seen
November 24, 2016
-
Hello guys,

I have defined WS as a woksheet and i want take an input from the user to select the worksheet using an input box. But I do not understand what should i type while setting WS.

Looking forward for your guidance :)

Sub WS_Var()

Dim WS As Worksheet

Set WS = Sheets ( ? )


WS = InputBox("select the sheet")
Worksheets(WS).Activate

End Sub

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!