Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2003
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unable to move focus to different cell (Excel 2002)

    I would like to check the contents of a column of cells. I am unable to move the focus to a different cell, though. Here's what I have tried to do:

    Dim varValue As String
    Dim Count As Integer
    Dim Test As Integer

    Range("B2").Select
    varValue = ActiveCell.Value
    Count = 1
    Test = 0

    Do While Test < 1

    Count = Count + 1
    'Worksheets("Sheet1").Cell(Count, 2) = ActiveCell [This is the first try]

    'or

    'Application.SendKeys ("{ENTER}") [This is the second try]


    varValue = ActiveCell.Value
    If varValue = "" Then
    Test = 1
    End If
    Loop

    I know the answer must be something easy! Thanks for your help!

    Laura

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Unable to move focus to different cell (Excel 2002)

    Try this:
    <pre>Worksheets("Sheet1").Cells(Count, 2).Activate</pre>


    Steve

Posting Permissions

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