+ Reply to Thread
Results 1 to 4 of 4

VBA to select next row if first has been filled.

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA to select next row if first has been filled.

    Hi There,

    First time post:

    I am creating a Time Clock for employee's to clock in and out. I currently have a "clock in" button with attached macro that asks for an employee number and records the number, current system time, and date on a separate worksheet("Entry Log"). My issue is that I want the next employee that selects the "clock in" button to record their data on the next row.

    I know I currently have is coded directly to the cells, but not sure how to write it differently and have it work.

    The end goal is also to have each employee's data linked to their own time sheet in a separate worksheet, that is already being created with the Clock in Macro. So any Ideas on this are appreciated.

    Thanks for any & help

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: VBA to select next row if first has been filled.

    As I understand it, you want to find the last row used on a sheet. You can use this code.
    Adjust the sheet reference as required. This assumes that you will always have something in the first column. To get the next (blank) column, just add +1 to the end of the code line.
    Please Login or Register  to view this content.
    If this is what you're looking for, please click on the add reputation link

  3. #3
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: VBA to select next row if first has been filled.

    Hi jascheman
    If you want to find the first empty row you can use
    Please Login or Register  to view this content.
    The message box will display the row number below the last used row on the Entry Log Worksheet.
    It looks up column A to get it.
    Your code is going to produce a new worksheet for every entry.

  4. #4
    Registered User
    Join Date
    03-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VBA to select next row if first has been filled.

    Thanks hectop and Philb1,

    That is the info I needed! Problem solved!!

+ 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. Select only filled cells in column to use insert command
    By Nancy Dratwa in forum Excel General
    Replies: 1
    Last Post: 08-19-2013, 11:03 AM
  2. [SOLVED] Locate-select records with both ColA & ColC filled
    By aiolosply in forum Excel General
    Replies: 11
    Last Post: 07-17-2012, 07:40 AM
  3. [SOLVED] How to select all records in a empty column between to filled columns
    By boerbende in forum Excel General
    Replies: 3
    Last Post: 11-20-2011, 07:37 AM
  4. combo box select cells filled auto
    By corchox in forum Excel General
    Replies: 0
    Last Post: 12-22-2010, 02:42 AM
  5. [SOLVED] [SOLVED] Select filled cells/rows in a spreadsheet
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2005, 08:35 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