Posts by gmccreedy

    Re: Write Protection Of Data

    You can load info from a file without opening...there is a "workaround" on this site. Just do a search.

    However, I do not think you can import information back to a closed file. It has to be opened at some point.

    Re: Write Protection Of Data

    How can you have mulitple people reading and writing to the same file? won't it be read-only when the second user tries to access this data?

    I think your going to have permisson problems here.

    Or are you just opening>loading data> then closing?

    Re: Copy Directory If File Exists

    Thanks Bob,

    One problem though. It only copies the directories under the root folder, but doesn't copy any files that live in the root folder.

    I tried playing around with the path a little, but nothing seemed to work.
    Any suggestions?

    Re: Macro To Save File And Automatically Overwrite Old File


    Re: Run-time Error Every Other Time The Macro Runs

    It a nut forces you to declare all of your variables. Its not necessary, but I reccomend it. It helps if you make a simple error...will trap it for you.

    Re: Run-time Error Every Other Time The Macro Runs

    Ok. I did a little damage to it. Tough to edit some of the code since I wasn't quite sure what it was doing. (you had a few areas where you pasted twice, so wasn't sure if it was a mistake and did the best I could to decipher.)

    This is untested. I suggest not overwriting your original code and just set this in a new module. I renamed with a "UD" for updated.

    I added a few comment cards with asterick lines for some areas.

    Re: Run-time Error Every Other Time The Macro Runs

    will get back to you in a bit. Will trump it down for you...but I am sure these guys will trim it even further. Like you, I am still a newbie...but I can assure you are in the right place for help!!!

    Back in a bit.

    Is it possible to search a directory looking for a particular file, then if found, copy the directory and all its contents to another location?

    it should be noted that not all of the files will be *.xls.

    Re: Set-up Of "if" "or" Formula?

    Is this statement checking on each line or is it a one time thing? What happens if its completed in all three cases?

    Where will this formula live? Is it checking each case separatly or as one formula?

    Re: Run-time Error Every Other Time The Macro Runs

    omg its the attack of the evil excel macro recorder...
    Have you tried just using the copy to destination feature?

    Sub YesRegen() 
         ' after user has hit Yes on the RegenerateRequest macro, this posts the new request to
         ' the log, generates the new file and attaches it to an email
        Application.Run "LogUnprotect" 
        Application.Run "RegenFormUnprotect"
        Range(Range("A" & ActiveCell.Row), Range("K" & ActiveCell.Row)).Copy Sheets("Regenerate Request").Range("A40")

    the more you select/activate things, the more the macro and efficiency slows down. you should never have to actually select anything. just call on it and execute your command.

    Norie has mentioned this above. Try wouldn't believe how much of that code (i say about 75%) is useless.

    Re: Run Code On Mulitple Sheets

    Quote from norie
    With ws.Range("D7:AH87")

    I changed this too

    With ws.Range("D7:AH87").validation

    Sure it was just an oversight on your part.

    Worked fantastic gentlemen....I am humbled by your wisdom and knowledge once again.

    Re: Run Code On Mulitple Sheets

    Thanks. It seems to operate now on a test update. going to run it for real now and see how it goes.

    I also changed...




    not sure if this is really necessary, but it seemed to help amidst the other things i was trying. thanks for your help guys. will reply back with results if it works.

    Thanks Again!!

    Re: Run Code On Mulitple Sheets

    the code runs, but doesn't make any of the changes (ie. adding the data validation on all the ws in each of the workbooks.)

    as a matter of fact, it appears to simply open the files, then save and close them. almost as if its jumping right over the code.

    I am going to reactivate screen updating and step through.

    I have a workbook that provides updates to our timesheet workbook. For some reason, I cannot get the code to execute the update. It doesn't crash, and appears to run fine, yet the update doesn't occur.

    Can someone see where I am going wrong here?

    Re: 2 Copies of The Same Workbook Open in Task Manager

    Its not carshing during a macro, its crashing on "save".

    Don't worry about this Dave...I appreciate your patience in trying to help, but this looks like a virtual memory problem that will be a real minder bender to fix.

    Without you actually seeing it, I don't think there is an easier answer.

    Going to "shelf" this for a while.

    Thanks anyway.