• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

Excel VBA - StandardWidth property

I have about 14 columns which have been modified to different sizes.  I would like to bring them all back to the standard width as defined in the properties window.  What is the VBA code to do this?
0
brothertruffle880
Asked:
brothertruffle880
2 Solutions
 
duncanb7Commented:
Try this as follow

Duncan

Sub test()
ActiveSheet.Columns.EntireColumn.ColumnWidth = ActiveSheet.StandardWidth
End Sub

Open in new window

0
 
Rory ArchibaldCommented:
You can also use:
Range("A:N").UseStandardWidth = True

Open in new window

for specific columns for example.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now