• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

x1Down and CountA issue.

joms

New Member
Is there away to change my formula below it feels like it has a lot of issue kindly see my formula below:

Code:
'Find Empty Row
Set a = Range("A:A")
a.End(xlDown).Select
Emp = WorksheetFunction.CountA(a)
 
Last edited by a moderator:

Marc L

Excel Ninja
First, it's not a formula …​
As this code has a lack of Logic the better is to explain your need like any forum expects for :​
 

joms

New Member
Okay my mistake. To re-phrase my question is there a way to change the code above set it for a specific set of range. here is the whole code: Previously i used to populate column A onward but my boss wanted to have a type written info from Column A to F, the problem is that after i populate column A to F and start using the macro for the code below instead of filling the next empty column it goes 1 row down for example i fill up A1 to F1 after using macro the next line would be on G2 to O2.

Code:
Private Sub Add_Click()
Dim Emp As Long, a As Range, b As Range
'Make SheetActive
Sheet1.Activate

'Find Empty Row
Set a = Range("A:A")
a.End(xlDown).Select
Emp = WorksheetFunction.CountA(a)

'Enter Data
Cells(Emp, 7).Value = InsideSalesListBox.Value
Cells(Emp, 8).Value = DescriptionListBox.Value
Cells(Emp, 9).Value = AccountTypeListBox.Value
Cells(Emp, 10).Value = ActionsListBox.Value
Cells(Emp, 11).Value = InteractionTypeListBox.Value
Cells(Emp, 12).Value = NBOListBox.Value
Cells(Emp, 13).Value = RemarksTextBox.Value
Cells(Emp, 14).Value = CompNameTextBox.Value
Cells(Emp, 15).Value = ContactPersonTextBox.Value
Cells(Emp, 16).Value = ActivityTypeListBox.Value
Cells(Emp, 21).Value = Status.Value
 
Last edited by a moderator:
Top