basicallyawesome
New Member
- Joined
- Jul 10, 2018
- Messages
- 29
- Office Version
- 365
I’m not sure if I have a problem here. It’s not bringing up an error code so it may be behaving as expected, I’m not entirely sure. I created two multipage forms after being encouraged to use them to fix one problem, I started with one from the getgo in this other project. It works perfectly except...
I’m running a shared workbook, I know this is not ideal but don’t have access to Access or other more robust software. Excel is as good as it gets. So I needed a way for it to check for the next blank row before inputting data since more than one user may be in it at any given time.
So this is what I’m using:
Private Sub Submit_Click()
’Accept all changes and find last row
ActiveWorkbook.AcceptAllChanges
ActiveWorkbook.Save
It seems to work, except that when I tested it with sharing turned on, but being the only one in it, it deposits my info on the second blank row. So for example
Row1 - Header row
Row2 - Blank
Row3 - First record
Row4 - Second record
If I start with data already in the sheet it behaves similarly:
Row1 - Header row
Row2 - First record
Row3 - Second record
Row4 - Third record
Row5 - Blank
Row6 - New Data
Without the above code, it puts the data in the first row after the header. Is this to be expected from the code I’m using? Will the above code do what I need it to do when it’s more than just me in the spreadsheet? Is there a way to fix it?
Thank you!
I’m running a shared workbook, I know this is not ideal but don’t have access to Access or other more robust software. Excel is as good as it gets. So I needed a way for it to check for the next blank row before inputting data since more than one user may be in it at any given time.
So this is what I’m using:
Private Sub Submit_Click()
’Accept all changes and find last row
ActiveWorkbook.AcceptAllChanges
ActiveWorkbook.Save
It seems to work, except that when I tested it with sharing turned on, but being the only one in it, it deposits my info on the second blank row. So for example
Row1 - Header row
Row2 - Blank
Row3 - First record
Row4 - Second record
If I start with data already in the sheet it behaves similarly:
Row1 - Header row
Row2 - First record
Row3 - Second record
Row4 - Third record
Row5 - Blank
Row6 - New Data
Without the above code, it puts the data in the first row after the header. Is this to be expected from the code I’m using? Will the above code do what I need it to do when it’s more than just me in the spreadsheet? Is there a way to fix it?
Thank you!