PDA

View Full Version : Change Direction



Dave evans
06-01-2018, 02:23 AM
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

SamT
06-01-2018, 04:59 AM
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)