Skip to content

Instantly share code, notes, and snippets.

@asilachev
Created February 10, 2017 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asilachev/2bcca21f9ff1a709641ebe882673822f to your computer and use it in GitHub Desktop.
Save asilachev/2bcca21f9ff1a709641ebe882673822f to your computer and use it in GitHub Desktop.
Sub Main()
Dim i, f, path, lastCol
f = FreeFile
path = "output.txt"
Open path For Output As #f
lastCol = ActiveSheet.UsedRange.Columns(ActiveSheet.UsedRange.Columns.Count).Column
For i = 1 To lastCol
Print #f, Cells(1, i).Width
Next
Close #f
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment