![]() |
#2
|
|||
|
|||
![]() Quote:
Code:
If WorksheetFunction.CountA(.Range("C5:C14")) = 0 Then Exit Sub Quote:
I would only unprotect and re-protect the sheet being worked on unless there's more to this than what I' seeing. Along the lines of this Code:
Sub CSVarmor() ' ' CSVarmor Macro ' paste and click csv to armor ' Application.ScreenUpdating = False With ActiveSheet If WorksheetFunction.CountA(.Range("C5:C14")) = 0 Then Exit Sub .Unprotect Password:="jtls" .Range("C5:C14").TextToColumns Destination:=.Range("C5"), _ DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=True, _ Comma:=False, Space:=False, Other:=False, _ FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _ TrailingMinusNumbers:=False .Protect Password:="jtls" End With Application.ScreenUpdating = True End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sorting in protected worksheet | john64 | Excel | 2 | 12-31-2016 12:04 PM |
![]() |
AHB | Excel Programming | 2 | 02-27-2012 10:25 AM |
![]() |
udea | Excel | 1 | 02-06-2012 07:43 PM |
![]() |
Platform | Mail Merge | 10 | 09-28-2011 05:12 AM |