Consulting

Results 1 to 2 of 2

Thread: Change Direction

  1. #1

    Change Direction

    hi all
    just joined and have a question i have googled to solve this problem i have to no avail so help here is available i hope
    ok then i have created a database that works fine but i need to change the direction it saves the entered values
    at the moment it enters horizontal data and i want to use it to enter vertically when submitted

    is there any code that will allow me to do this below is the current code being used

    'find first empty row in database
    iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _
    SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1

    thanks in advance for your help

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Well... You're talking about a "data" Range, which is different than a "Table," (which is a new thing in Excel,) and is different than a DataBase, which is an Access thing.

    Sorry to be so pedantic, but programming is by definition extremely pedantic.

    You have to know which Column you want to put the new data in. There are two ways I use. The first is if you need to use the Cells(Row#, Col#) = X style and the latter is if you want to use Range = X Style
    'Next empty Cell in Column. Column "A" in these examples
    iRow = Cells(Rows.Count, "A").Row + 1 
    
    Set iRange = Cells(Rows.Count, "A")..Offset(1,0)
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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