Results 1 to 3 of 3

Thread: VB6 Excel & class module

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Devon - UK
    Posts
    214

    VB6 Excel & class module

    I'm creating an Excel sheet dynamically from VB and adding an oleobject commandbutton. I've added a class module to the VB6 project.

    So far so good.

    I've managed to pick up some of the event from creating the workbook but whatever I do I can't pick up the button click event - I've been trying for days.

    Does anyone have a simple code example or point me to a solution?

    Best regards

    Barry

  2. #2
    Fanatic Member THEROB's Avatar
    Join Date
    Oct 2000
    Location
    I'm cold and there are wolves after me
    Posts
    575

    Re: VB6 Excel & class module

    Just double click on the button - and see where excel brings you usually works for me. If this doesn't work can you attach the xls file.

    R
    My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Devon - UK
    Posts
    214

    Re: VB6 Excel & class module

    TheRob

    I've double clicked the button many time and VB does not seem to detect anything in the calss module. In the class module I've tried withevents Btn as oleobject. I've tried withevents Btn as commandbutton. Neither work.

    I'll attach the Excel file that VB generates tonight.

    Thanks for the reply

    A still mystified Bazza

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