View Full Version : Solved: Calling a Function and Resize
Is it possible to call a function to get the desired number to use in a resize statement? For example, there is a function called getRows that defines the number of current data rows exist. I tried the following but it did not work.
Selection.Resize(getRows).Select
Bob Phillips
07-17-2010, 11:26 AM
That should work.
This worked for me
Sub ResizeIt()
Selection.Resize(getRows).Select
End Sub
Function getRows()
getRows = 5
End Function
Your response caused me to see what I think might have been my problem. getRows was a subroutine rather than a function. After seeing your example, I changed it to a function and it works fine now. Thanks.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.