borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (newbie....)Next Topic (Macro in Outlook) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Help !! Need to export data from one Work Sheet to another.
Poster Message
jack_sparrow
Level: Protégé

Registered: 24-04-2006
Posts: 4

icon Help !! Need to export data from one Work Sheet to another.

To , all the VB Lords in here .. Pl help .

I have a data sheet in Excel and a blank form in the same worksheet.

I want to select a specific Order # from the data sheet and want to fill up
a form with the details of the specific Order # selected. I just want to
click on the Order # cell and want to populate the form. Suppose, if I
select 3 diferent Order # from data sheet....I want the VB code to fill up
the form with the details of all the 3 Order # selected...all in one single
Form.

I have attached the file which has a data sheet, a blank form and a sample
filed-up form.


Thanks
jack



[Edited by jack_sparrow on 24-04-2006 at 09:20 AM GMT]

____________________________
Attached:
Data.zip 4 KB (Downloads: 6)

24-04-2006 at 03:10 PM
View Profile Send Email to User Show All Posts | Quote Reply
neutrall
Level: Master


Registered: 28-03-2004
Posts: 122
icon Re: Help !! Need to export data from one Work Sheet to another.

Hi,
  I would suggest using the double click event on your worksheet.  with something like this :

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    'If user click on column "A"
    If Target.Column = 1 Then
    
        'Sample Code Here
        Feuil2.Cells(26, 2).Value = Feuil1.Cells(Target.Row, 1).Value
        'etc...
        'To the same wich each form
        Cancel = True
    End If


End Sub


To use multiple selection, use the Right Click event, and and use the for ... each command to go throuch each selection, using the same principle as above.

Daniel B.

____________________________
A Stick give a wise man something to think about... and a fool, something to put in is mouth.

13-06-2006 at 02:11 PM
View Profile Send Email to User Show All Posts Visit Homepage ICQ | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Help !! Need to export data from one Work Sheet to another.
Previous Topic (newbie....)Next Topic (Macro in Outlook) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder