+ Reply to Thread
Results 1 to 10 of 10

Cell control using VBA

  1. #1
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Cell control using VBA

    VBA is still a new world to me. Any help you can provide will be appreciated...

    I have a workbook created to capture

    1) Material Number entered manually
    Currently I have this range defined as "Hard_MN"
    2)dimensions transmitted via Bluetooth calipers.
    Currently I have this range defined as "Hard_Dim"
    Upon receiving the data in the active cell the it acts as an enter event. (Active cell moves to the next unlocked cell below)

    Can you show me the needed VBA to;
    1)When cell change event happens in cells in range Hard_MN always treat as an "enter" move to the cell below until last cell in the range
    2)When cell change event happens in cells in range Hard_Dim always treat as a "Tab" move to the next unlocked cell left to right

    I assume you don’t need the actual cells being the cells needing attention are named in a range.

    Attached is a screenshot of a portion of the spreadsheet

  2. #2
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Re: Cell control using VBA

    Screenshot did not upload
    Last edited by chaseboutte; 10-05-2017 at 08:35 PM.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cell control using VBA

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Re: Cell control using VBA

    Sample WB attached.

    Once a cell change happens in cell range named "Hard_Dim" I need it to treat the next move as a tab over.
    Workbook will be protected when rolled out to the user. Only yellow cells will be unlocked.

    Basically when the user is filling out the spreadsheet for the actual's, I do not want it to automatically move to an active cell in column e

    Example:

    User activates Call H1.
    Sends information via bluetooth caliper to cell. By default once the information is sent to the cell an enter event happens.

    What I need to happen next is
    Cell H13 activated ready for input
    then cell L13
    then cell H14
    and so on...
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Cell control using VBA

    Try this worksheet event

    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 10-05-2017 at 10:18 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Re: Cell control using VBA

    Thanks for the reply but its not working. Upon enter event in the first cell H1, L1 is activated. I am unable to activate any other cell.
    Trying to read the code you suggested, I don't think it would work.

    To simplify my objective...
    All cells are locked except for the Blue and Yellow cells.
    When the user inputs information in the blue cells "E9:E20" and presses enter, the next cell activated should be the one below it. By default this is happening now.
    My reason for needing VBA is when the user inputs data in a yellow cell I need the next cell activated in a left to right zig zag manner by pressing the ENTER key

    I have many worksheets to apply this to, with different variations of yellow cell needing data. This is why I am hoping a named range can be used instead of calling out each yellow cell. For this scenario, I named the range Hard_Dim

    Attached is a screenshot of what I want to accomplish, along with a macro enabled workbook for anyone who wants to test.

    Thanks for your time...
    Attached Images Attached Images
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Re: Cell control using VBA

    Good morning everyone...

    Is my question coming across as confusing or is this something I will have trouble accomplishing?

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Cell control using VBA

    setthe default settings in Editing options.
    In version 2007
    Excel options --> Advanced

    Editing options -->

    After pressinmove, move selection

    Direction --. (select)Right.
    Last edited by kvsrinivasamurthy; 10-06-2017 at 10:06 AM.

  9. #9
    Registered User
    Join Date
    08-15-2017
    Location
    Broussard La
    MS-Off Ver
    13
    Posts
    8

    Re: Cell control using VBA

    Thanks and that was my first thought, to change the default of enter from down to right.
    Unfortunately it doesn't work for 2 reasons

    1) As the user enters the information in the yellow cells with enter now defined as a left move, once data is entered in the last yellow cell in a row, the next active cell would be in the Blue Column. The user would have to travel back to his keyboard and manually move over to the next yellow cell. User will be 10' away from his computer at this time.

    2)When the user enters the information on the last yellow cell of a row and if the beginning of the next row is merged, then it becomes a loop... Example is row 18 in the above screenshot

    This is the reason I am needing VBA.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Cell control using VBA

    As i checked cursor is moving only in yellow cells only in horizontal till last yellow cell and then to next row.Blue cells are locked I feel.

    E18 is merged cell it is to be demerged.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Run private sub assigned to Active X Control with a Form Control Button
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2017, 11:38 PM
  2. [SOLVED] Any way to avoid hardcoding control name inside the control event procedure?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-24-2015, 07:50 PM
  3. Is there a way to control a range from a single ‘’control cell’’.
    By Joe Miller in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2014, 06:14 AM
  4. [SOLVED] Possible to control cell range with another cell as a variable - then use Solver?
    By hadamhiram in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-17-2013, 02:25 AM
  5. [SOLVED] VBA Code to have a repeating form control /Active X control (List box) in every row
    By Ehezve in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2013, 08:55 PM
  6. [SOLVED] making a control cell referenced (specific cell rather than ActiveCell )?
    By dredwolf in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-11-2012, 05:05 PM
  7. [SOLVED] Programatically control picture property of Image control
    By Brassman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2005, 05:06 PM

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