Uses for the range.find method

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,112
Can you use the range.find method to find the lowest row that the contents of a text box have expanded down to cover?

For instance, if I have a regular text box with resize shape to fit text selected. I put the textbox in row 2, type "a" + hit enter, type "a" + hit enter, type "a" + hit enter, so now the text box covers from rows 2-4. Can I use the range.find method to find the lowest row the text has expanded to, so in this case, it will be row 4?

Or do you need an active x text box to do the same thing?
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,166
Try this...

Code:
LowestRow = Sheets("Sheet1").TextBoxes("Text Box 1").BottomRightCell.Row
 

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,112
Thanks for that AlphaFrog.

That gives me the row of the bottom of my text box. Is there a way to measure the distance between several rows below that point and the bottom of the page that is on that sheet?
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,166
I thought you wanted the bottom of textbox row.

I don't understand what the rest of that means.
 

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,112
Sorry to be a bit vague before AlphaFrog. I did want the bottom of the text row but that was to try and work out if I could use it to see if a image would fit in the space between the bottom of the box and the end of the page. If there wasn't enough space, I wanted the image pushed to the next page or maybe a page break being inserted. So wanting to know how to find the lowest row was just a means to an end, but I am still having trouble with the end.

Do you know how I could solve the above problem?
 

Forum statistics

Threads
1,082,246
Messages
5,364,001
Members
400,773
Latest member
jwolfe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top