+ Reply to Thread
Results 1 to 3 of 3

why it doesn't work?

  1. #1
    Demian
    Guest

    why it doesn't work?

    Private Sub Worksheet_Change(ByVal Target As Range) '

    If Target.Address = "$C$3" Then
    Worksheets("another sheet").Activate
    MsgBox Cells(3, 1) 'from "another sheet" sheet
    --------------

    Msgbox shows a cell value from "main" sheet not from "another sheet". Can
    You help me, thanks in advance





  2. #2
    Harald Staff
    Guest

    Re: why it doesn't work?

    You didn.t address it, so cells(3, 1) is cell A3 in Me (the sheet containing
    the code).

    MsgBox Worksheets("another sheet").Cells(3, 1).Value
    should do.

    HTH. Best wishes Harald

    "Demian" <tmietiu@poczta.onet.pl> skrev i melding
    news:da30e6$r6n$1@news.onet.pl...
    > Private Sub Worksheet_Change(ByVal Target As Range) '
    >
    > If Target.Address = "$C$3" Then
    > Worksheets("another sheet").Activate
    > MsgBox Cells(3, 1) 'from "another sheet" sheet
    > --------------
    >
    > Msgbox shows a cell value from "main" sheet not from "another sheet". Can
    > You help me, thanks in advance
    >
    >
    >
    >




  3. #3
    Roman
    Guest

    Re: why it doesn't work?

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$C$3" Then
    Worksheets("sheet2").Activate
    MsgBox ActiveSheet.Cells(3, 1) 'from "another sheet" sheet
    End If
    End Sub

    Or without activating the other sheet:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$C$3" Then
    MsgBox Worksheets("sheet2").Cells(3, 1) 'from "another sheet" sheet
    End If
    End Sub


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1