Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I unprotect cells when using OpenText function?
My Excel application needs to programmatically import data from a text file.
The fastest way I've found to do that is to use the following line (where lFile is a string containing the path and filename of the file to read): Workbooks.OpenText Filename:=lFile, DataType:=xlDelimited, Tab:=True Then I do: Selection.Copy with the "imported" file xls file active. Then it activates the original workbook (the destination), and does: Range(strPasteStartPosition).Select ActiveSheet.Paste But it seems that when I do that, all of the cells wind up "Locked"... I'd like it if I could set up the destination to keep/remember which cells should be locked, and which should not. Barring that, I would need to import the cells all as "unlocked". And as for the idea of doing two nested FOR...NEXT loops, to change the Cells().Locked property to True, it seems that this tends to add about 500% onto the time it takes to "load" each file, which makes that unacceptable. Is there an easier way to do this? Thanks! -Scott |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
unprotect specfic cells in worksheet | Excel Worksheet Functions | |||
Protect / unprotect function | Excel Worksheet Functions | |||
Cells locking after Protect/Unprotect | Excel Discussion (Misc queries) | |||
How do I unprotect certain cells in a protected sheet? | Excel Worksheet Functions | |||
OpenText bug ? | Excel Programming |