Hi, Need help regarding the following code:

I have written a code which would help me to determine Which sheet is the
user on, and if that matches the criteria, then the statement would be
executed. I believe, that i am not able to make the macro identify which
sheet is the User on.

Code:


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Activeworksheet.Selection = Sheets("Main") Then
   x = Target.Address

   Select Case x

    Case "$E$16"

        y = Target.Value
        Worksheets(y).Select
    End Select
    End If

End Sub


I want the statements to proceed only if the user is on Sheet: Main, and the
code should navigate the focus to the sheet, whose name is saved in Cell

Thanks

Harpreet Gujral

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,700 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to