Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
VBA and EXCEL... HELP Please!
I am new to VBA although I've been programming in VB for a few years. I am trying to create a time sheet entry program in Excel2000 and have run across a problem I can't get a handle on.
The user enters time into a cell (ex. 4). After entering the 4, I have an export button that they will click to copy the contents of the cell containing the number 4, to another cell in the sheet. No problem so far. The next time they enter time(ex.6), I want the export button to look at the cell containing the 4 and determine whether there is a number already there and if there is, skip down to the next cell and place the 6 there. In other words, I want an if-then-else statement to determine whether a cell is occupied or not. If it is occupied, I want the new time entry to go to a different cell and place its contents there. I am using no variables, I just can't find a function in VBA to use. IsEmpty and IsNull don't seem to work. Here is my code:
If IsEmpty(Worksheets("Monday").Range("j5:k5")) Then
ElseIf IsEmpty(Worksheets("Monday").Range("j6:k6")) Then
If anyone can help on this I would really appreciate it!
0 · ·