ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Visual Basic Multi-Stepped process (https://www.excelbanter.com/excel-programming/346160-visual-basic-multi-stepped-process.html)

MK@Hartford

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?


Tom Ogilvy

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" wrote in message
ups.com...
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?





All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com