Results 1 to 9 of 9

Thread: Inserted Excel Worksheet

Hybrid View

  1. #1
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inserted Excel Worksheet

    I had a bit of a play around, but I can't find any way to actually reference the sheet (or workbook etc) with that method.

    What you could do instead (if you want to keep it inside your form) is use the OLE control, set the Class to Excel.Sheet , and then use code like this:
    Code:
    'OLE1.object is equivalent to a WorkBook
      OLE1.object.sheets(1).Cells(2, 1) = "hello"
    ..or if you want to do multiple things with it, like this:
    Code:
      With OLE1.object.sheets(1)
         .Cells(2, 1) = "hello"
         .Cells(2, 2) = "more text"
    ...
      End With
    If you are willing to have Excel run as a separate application to your program, see the Excel Tutorial link in my signature.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Posts
    157

    Re: Inserted Excel Worksheet

    How do i load these OLE contorl ?

    Regards
    SamF

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