Excel VBA For Each Worksheet Loop
问题 I am working on code to basically go through each sheet in my Workbook, and then update column widths. Below is the code I wrote; I don't receive any errors, but it also doesn't actually do anything. Any help is greatly appreciated! Option Explicit Dim ws As Worksheet, a As Range Sub forEachWs() For Each ws In ActiveWorkbook.Worksheets Call resizingColumns Next End Sub Sub resizingColumns() Range("A:A").ColumnWidth = 20.14 Range("B:B").ColumnWidth = 9.71 Range("C:C").ColumnWidth = 35.86 Range