Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002

    Unanswered: How do i Insert Event into the Excel WorkSheet from VB


    i have problem this is very urgent. i loading excel file from VB application with some data at the same time i want to load the following event into the worksheet from the VB when the excel is opening

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim rngActiveRange As Excel.Range

    ' Range object returned from the Selection property.
    Set rngActiveRange = Selection
    Call PrintRangeInfo(rngActiveRange)
    End Sub

    so that each cell click event i can fire this event. but how do i load this event into the active worksheet when i am loading the excel application from the Visual Basic

    Thanking you

    Last edited by dgchoudary; 07-03-02 at 02:19.

  2. #2
    Join Date
    Feb 2002
    What problem are you having ?

  3. #3
    Join Date
    Feb 2002
    I received your message. Are you using visual basic - creating a project from scratch, or are you using vba with excel ? In this example, using vba would be much easier - no vb project would be needed - all you would have to do is to use the events using vba. If you are creating a full blown visual basic project, are there reasons why you can not use vba in the actual excel file ?

Posting Permissions

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