Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Updating not working

Status
Not open for further replies.

rpg121

Programmer
Mar 14, 2001
89
US
I have an Excel 97 VBA program, and i'm editing a wordpad file (.ltd) and i need it to go faster, so i tried the screenupdating command and had it set to false, but it won't work. Right now it takes about 3 hours to change 6000 entries. I am asking if anyone knows how to access a file without activating it, because that would surely speed it up. Thanks

RPG121
 
how are you going through the data in the word pad file ?
im not to up on accessing text files et cbut on the data side how about uploading the data into an array make your cahnges in the array adn then save it back to the file, that should take no time if you use a Do loop

so for example


dim MyArray()
dim MyData()
Dim BrKctr
Dim CtrArr

set mydata = whatever your dataset is

Myarray() = mydata

Brkctr = Ubound(Myarray)

Do until ctrarr = brkctr

if myarray(ctrarr,5) = "Today" then
myarray(ctrarr, 6) = "Hullo"
end if

myarray (ctrarr, 2) = now()

ctr = ctrarr + 1

loop

mydata = myarray


i dont know how you would get the data in the word pad to the array , when yuo do a worksheet normally you select one cell and put something like Myarray = Range("a1").currentregion then when putting it back you simply recverse.

but if you loop through the array it will take seconds


hope this helps a bit


CHance




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top