LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Array Function help

I want three sheets to autofit certain columns. Here is the code that I
currently have in my script... ugly.

Worksheets("Sheet1").Columns("A:Z").AutoFit
Worksheets("Sheet2").Columns("A:Z").AutoFit
Worksheets("Sheet3").Columns("A:Z").AutoFit

I want to try something more like:

Worksheets(Array("Sheet1","Sheet2","sheet3")).Colu mns("A:Z").AutoFit

I'm getting an error on this code, though. Thanks in advance for
helping a beginner.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array function - I think! CES Excel Worksheet Functions 8 March 30th 10 06:11 PM
OR function in array-entered IF function veggies27 Excel Worksheet Functions 8 March 11th 08 06:32 PM
Array Function John Michl Excel Worksheet Functions 6 March 20th 06 03:16 PM
#DIV/0! in the array function Sergun Excel Worksheet Functions 1 November 25th 05 01:14 PM
UDF Array function Dave Peterson[_3_] Excel Programming 0 July 10th 03 04:30 AM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"