9tanstaafl9
Well-known Member
- Joined
- Mar 23, 2008
- Messages
- 535
How would I go about finding the widest column in a range using VBA?
I'm trying to make all the columns equal in width, and as wide as the widest column. I've got the part to adjust the column widths figured out, I just need to know how to find the one that is widest in the first place so I can steal it's columnwidth for my macro. needs to be done in VBA since it will change every time the report is run.
Thanks!
And if this is cross posting I apologize. I'm not sure since the question no longer has to do with the function I asked about. I had asked a question earlier about using MAX and it not working correctly. Someone helped me with that, and I got MAX to work, but it didn't do what I thought it would do and i think I was on the totally wrong track.
I'm trying to make all the columns equal in width, and as wide as the widest column. I've got the part to adjust the column widths figured out, I just need to know how to find the one that is widest in the first place so I can steal it's columnwidth for my macro. needs to be done in VBA since it will change every time the report is run.
Thanks!
And if this is cross posting I apologize. I'm not sure since the question no longer has to do with the function I asked about. I had asked a question earlier about using MAX and it not working correctly. Someone helped me with that, and I got MAX to work, but it didn't do what I thought it would do and i think I was on the totally wrong track.