Active Cell.
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Active Cell.

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I want to write a macro whereby it takes the end user into a specific cell in edit mode and will not let the end user leave the cell blank (I have already validated the cell to require a date) any ideas?

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Nigel

    assumming you know how to select a cell with VBA place this in the Private Module of the Sheet concerned. Right click on the sheet name tab and select "View Code"

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
    Application.MoveAfterReturn = Not IsEmpty(Target.Value)
    End If
    End Sub

    As you can see it assumes your cell is A1

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Posts
    133
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Sorry I don't know how to select a cell with VBA.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com