Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2011, 06:56 AM
gjcase gjcase is offline Macro or user function to Extract row height Windows 7 32bit Macro or user function to Extract row height Office 2010 32bit
Novice
 
Join Date: Jun 2011
Posts: 7
gjcase is on a distinguished road
Default

Catalin:



I'm confused. I assume you are reading data from other workbooks (vs worksheets, which would be contained within the same workbook, and therefore always accessible.) However, to read the data, you must have the source workbook open, and therefore you should be able to read the row height at the same time, correct?

I agree with Tony, a macro which opens each source, reads the data and rowheight, and writes that to the collector and then closes the source, would seem to be the way to go.
Reply With Quote
  #2  
Old 06-22-2011, 07:13 AM
Catalin.B Catalin.B is offline Macro or user function to Extract row height Windows Vista Macro or user function to Extract row height Office 2007
Expert
Macro or user function to Extract row height
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

You are right, gjcase,
text data are in separate workbook.
But to read the data from that workbook, it is not necesary for that workbook to be opened.
Only the macro with User Defined Function looks like it is not working with the source workbook closed.
Excuse me for the confusion i created...
Looks like there is no other option but to open it so i can read the row height...
Thanks for advices, gjcase and Tony
Reply With Quote
  #3  
Old 06-22-2011, 07:50 AM
gjcase gjcase is offline Macro or user function to Extract row height Windows 7 32bit Macro or user function to Extract row height Office 2010 32bit
Novice
 
Join Date: Jun 2011
Posts: 7
gjcase is on a distinguished road
Default

Another solution might be to read the data into a workbook for which you can apply an autofit, and then read from this intermediate file the row height info into your collector workbook.
Reply With Quote
  #4  
Old 06-22-2011, 08:07 AM
Catalin.B Catalin.B is offline Macro or user function to Extract row height Windows Vista Macro or user function to Extract row height Office 2007
Expert
Macro or user function to Extract row height
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Dear friend, i do have a link between workbooks, but if i apply autofit to the cell containing the link to the source workbook, the height of the row will always be 15, no matter how long is the text.
I am working to a solution which counts characters in text : =LEN(A1), and to set the row height depending on this count. At first evaluation, looks like this method does not need the source workbook to be open...
Thanks again for your time gjcase, i will let you know if i find an acceptable solution, and please let me know if you have a better way
Reply With Quote
  #5  
Old 06-22-2011, 09:04 AM
gjcase gjcase is offline Macro or user function to Extract row height Windows 7 32bit Macro or user function to Extract row height Office 2010 32bit
Novice
 
Join Date: Jun 2011
Posts: 7
gjcase is on a distinguished road
Default

Catalin:

See the attached files. I have a source file, Book3.xlsm, an intermediate file, Intermediate.xlsm, which reads the data from the source, runs an autofit, and copies to the third file, collector.xlsm. See if this does what you are after.
Attached Files
File Type: xlsm Book3.xlsm (9.0 KB, 14 views)
File Type: xlsm Intermediate.xlsm (20.7 KB, 14 views)
File Type: xlsm collector.xlsm (8.3 KB, 15 views)
Reply With Quote
  #6  
Old 06-22-2011, 09:21 AM
Catalin.B Catalin.B is offline Macro or user function to Extract row height Windows Vista Macro or user function to Extract row height Office 2007
Expert
Macro or user function to Extract row height
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Yes, gjcase, this is exactly what i need, only the intermediate is unnecessary, i will adjust the macro to copy directly from book 3 in collector.
Great solution, gjcase, thanks a lot.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting HTML into Excel (height auto-adjust) c-tran Excel 0 03-11-2010 07:30 AM
automatic start of macro + help on writing helper function vsempoux Word 3 10-09-2009 03:01 AM
Macro or user function to Extract row height Macro or Function to know wether a string is included in a text Eduardo Word VBA 5 06-15-2009 01:55 AM
Macro or user function to Extract row height Help! for using an appropriate function/Macro in Excel pawan2paw Excel 1 06-04-2009 12:28 PM
Validate the height of the text when you save (VBA) jhpe Word VBA 0 08-22-2008 06:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft