+ Reply to Thread
Results 1 to 2 of 2

Visual Basic Multi-Stepped process

  1. #1
    MK@Hartford
    Guest

    Visual Basic Multi-Stepped process

    I have an "Application" I've been working with in Excel using a lot of
    VB Scripting behind the scenes. I have pages with "Button" Objects that
    reference adjscent cells. I am having trouble associating the specific
    buttons to the rows and also having them paste to one specific page.
    There are 50+ Pages of these objects (20-30 buttons per page) and 1
    final page recieving the pasted text from these 50+ pages. I also need
    to "find next blank row" in a certain range to paste this text.

    Since the options of pasting the text could start on any one of the 50
    pages, I need to set a variable to look for the next abailable blank
    row on the last page so that the data will past in the order they chose
    the "buttons" that they clicked. My code for finding the next available
    row is not working.

    Side question, How does "merged" cells affect the outcome of using a
    range correctly in a formula for pasting?

    Any suggestions?


  2. #2
    Tom Ogilvy
    Guest

    Re: Visual Basic Multi-Stepped process

    All objects on a page are Shapes and a shape has a topleftcell and
    bottomrightcell property.

    If the buttons are from the forms toolbar, the you could use the smaller
    collection Buttons. Each button would also have this property.

    If the buttons are commandbuttons from the control toolbox toolbar, then
    they are in the OleObjects collection which each also have this property.

    to find the next empty cell in column A for example

    with worksheets("Sheet1")
    set rng = cells(rows.count,1).end(xlup)(2)
    End With
    msgbox rng.Address

    --
    Regards,
    Tom Ogilvy


    "MK@Hartford" <[email protected]> wrote in message
    news:[email protected]...
    > I have an "Application" I've been working with in Excel using a lot of
    > VB Scripting behind the scenes. I have pages with "Button" Objects that
    > reference adjscent cells. I am having trouble associating the specific
    > buttons to the rows and also having them paste to one specific page.
    > There are 50+ Pages of these objects (20-30 buttons per page) and 1
    > final page recieving the pasted text from these 50+ pages. I also need
    > to "find next blank row" in a certain range to paste this text.
    >
    > Since the options of pasting the text could start on any one of the 50
    > pages, I need to set a variable to look for the next abailable blank
    > row on the last page so that the data will past in the order they chose
    > the "buttons" that they clicked. My code for finding the next available
    > row is not working.
    >
    > Side question, How does "merged" cells affect the outcome of using a
    > range correctly in a formula for pasting?
    >
    > Any suggestions?
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1