CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2011
    Posts
    5

    Question Help me in adding Entries in Excel using VBA

    I have 3 text boxes with a command button. My request is that after i had entered the text in the text boxes and when the command button is clicked The entries should be added to A1,A2,A3 respectively
    and the form should appear again and when i enter the text and click the command button the text should be added to B1,B2,B3 respectively....

    Thank you

    Waiting for your reply....

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Help me in adding Entries in Excel using VBA

    We can help you AFTER you try it yourself. IF you get stuck, post the code, USING TAGS, and we'll help with specifics. We don't do homework.

    Code:
    ' Code comments 
    '  like this
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Nov 2011
    Posts
    5

    Re: Help me in adding Entries in Excel using VBA

    ok fine..thank you

  4. #4
    Join Date
    Aug 2011
    Posts
    35

    Re: Help me in adding Entries in Excel using VBA

    Public Col%

    Private Sub Command_Click()
    ...
    Col=Col+1
    wdat.Cells(1, Col).Value = Text1.Text
    wdat.Cells(2, Col).Value = Text2.Text
    wdat.Cells(3, Col).Value = Text3.Text
    ...
    End Sub

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Help me in adding Entries in Excel using VBA

    Ever READ anybody else's post? How about using CODE TAGS, so that others do the same thing?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured