Consulting

Results 1 to 6 of 6

Thread: Solved: passing object name

  1. #1

    Solved: passing object name

    Hi X-Perts ,
    I have the following broblem to solve. There is a set of OWC spreadsheets on a MultiPage, one spreadsheet on each page. I need to be able to set up a spreadsheet object depending on MultiPage page selected.

    eg.
    I select page #3 that holds object Spreadsheet3

    I would like to proceed like following
    [vba]
    dim my_Sheet as OWC.Spreadsheet
    set my_Sheet = Me.Spreadsheet3

    With Me.Spreadsheet3
    .ActiveSheet.Cells(1,1).Value = "U gotta see this message now"
    End With
    [/vba]

    ...Q is , if I pass the spreadsheet name like a string, say "Spreadsheet3", how do I get it to be recognized as an object's name?

    Regards ,
    serge

  2. #2
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    serge

    Why not pass the actual object?

  3. #3
    Yeah,
    I got to a similar conclusion, and why not, sounds like the only neat solution so far?

    Thanks Norie,
    Serge

  4. #4

    Thumbs up

    Can anybody tell me what I am supposed to do with the threads that I consider to have been answered. I noticed that some people post "Solved" in front of the original title, does that mean they are satisfied with the replies and hence are closing the post. How do I edit the title then??

    Thanks,
    serge

  5. #5
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    serge

    I think you mark a thread solved using Thread Tools at the top of the page.

  6. #6
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hi Serge,

    We're still in a board upgrade, so the "Mark Thead Solved" function in the Thread Tools is not working. I'll edit the post title for you.

    Cheers!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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