+ Reply to Thread
Results 1 to 3 of 3

Modify code

  1. #1
    Registered User
    Join Date
    02-05-2007
    Posts
    12

    Modify code

    Could someone show me how to create a macro that would insert a word phrase each key entry and then reset the focus to the next cell below.

    I created one but it moves the focus to the cell below where I created the macro.

    I would like 3 Macros that would add the following wording into the Particulars column...

    CTRL + l = Charge For Lesson
    CTRL + b = Charge For Books
    CTRL + p = Payment

    If you could either show me how to do this or insert it into the excel file attached I would appreciate it.

    Steve
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612
    Right click the sheet tab and choose "view code".
    In the VBasic Editor, double click "module2" in the project pane.
    Replace the second line of your macro, i.e.,:
    Range("J8").Select
    with the following:
    Please Login or Register  to view this content.

    It will select the cell immediately below the one where the text was inserted.
    Ben Van Johnson

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I think you want to run the macro to enter one of these options into the active cell. You don't need a macro to do this, imply create a Data Validation list in the cells of he appropriate column. See this for guidance

    http://www.excel-it.com/data_validation.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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