+ Reply to Thread
Results 1 to 4 of 4

Code Not working Right ??

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    35

    Code Not working Right ??

    Good morning all, being new to VBA I am struggling slightly with a bit of code that will excel select the next available empty row in a workbook. I have managed to partially figure it out but its not working right and I am getting in error. I have been trying

    Please Login or Register  to view this content.
    Line 1 works ok
    Line 2 works ok - A6 is the last cell that has text
    Line 3 ??? - this should take me from A6 to the next cell A7 to paste information into it taking me down to say A11

    This code will be used to continually add new information to the sheet therefore the next batch of information would be pasted into A12 etc.

    Thanks in advance for your help

    Sandy

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    8,031

    Re: Code Not working Right ??

    You could use .OFFSET(1,0) before select on line 2. That would take you to the next row and negate the need for row 3.

    BSB

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Code Not working Right ??

    Accidental duplicate.
    Last edited by Norie; 05-11-2016 at 06:25 AM.
    If posting code please use code tags, see here.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Code Not working Right ??

    You could aye just use one line.
    Please Login or Register  to view this content.

+ 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] Pattern Building VBA Code - Working code, would like to use cleaner code
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-10-2015, 03:05 PM
  2. [SOLVED] Vba code working in workbook module but not working from personal.xlb
    By satputenandkumar0 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-19-2014, 05:47 AM
  3. Replies: 1
    Last Post: 11-13-2013, 10:28 AM
  4. Removing code line stops code working?!?!?
    By adamj1910 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 02:36 PM
  5. [SOLVED] VBA Code (colums to row, autofill) stop working in row 294 when new cable code appear
    By sknifseht in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2012, 05:27 AM
  6. Code for email alerts from excel isn't working, wrong code possibly?
    By jessthorogood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 01:45 AM
  7. VB code not working...
    By Bwangster12 in forum Excel General
    Replies: 9
    Last Post: 08-21-2008, 11:46 AM

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