Guest User

Untitled

a guest
Jan 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. ' Differs from Walkenbach in that he just populated A1 if empty,did this on A1,restored A1. This is better IFF you are allowed to add a workbook.
  2. Sub UnFuckAutomaticTextToColumns()
  3. If ActiveSheet.ProtectContents Then MsgBox "BTW, the active sheet is protected. Consider unprotecting 'ere TextToColumns"
  4. Workbooks.Add
  5. Cells(1) = "A" 'Required, else TextToColumns will error
  6. Cells(1).TextToColumns DataType:=xlDelimited, Tab:=False, semicolon:=False, _
  7. comma:=False, Space:=False, other:=False
  8. ActiveWorkbook.Close False
  9. End Sub
Add Comment
Please, Sign In to add comment