Hello!
This is my first post and I made sure I couldn't find the answer before starting the new thread. I'm having trouble with the VB part of the User Form (I'm very new at this). The explanation to my project is under all the equal signs. The puzzle I'm attempting to fix is shown below for those of you who cannot afford to read a lot right now.
So I want "i" to count up by 1 every time Excel reads something in a cell in each row in column 1. I want the code to run such that once excel finds an empty cell in a row column 1, the loop will stop running. Thing is, it never loops. It only goes once. So if I have say, (A2:A7) filled with something while A8 is empty, the code won't loop. It will seemingly ignore the loop and only add 1 to "i". It's as if the "Do" loop isn't there at all.
I'm not at work but I know that if I can solve this one little part of the code, it'll all work:
Do
i = i + 1
Loop Until IsEmpty(ActiveCell.Offset(1, 0))
Any help is appreciated, thanks!
======================================================================================================================================
I'm trying to allow a user to fill out a form (based on report data) and have the data entered into a sheet. The main "key", if you will, is the ID number of the report they want to enter. Then there are items which is associated with the data. There can be as many as 1 to 20 items per report entered. The thing is, the report items themselves have to be recorded such that they can be easily looked up, with the associated report ID shown as well.
To these ends, I have decided to enter every item into the sheet in the 2nd column along with the associated report ID in the first column (therefore, the report ID's may often repeat as there are more than one item per report usually).
In order to program the User Form, I was using a "Do" loop (as shown above) to allow the program to scan the first column until it found an empty cell. Then the report ID was to be placed in that empty cell. If there are, say, 2 items for this one report, I need the report ID listed again so that if item #2 is searched, there will be a report ID allotted to it.
Bookmarks