Hello, When I run the macro, it stops with error code 5941 - requested member of the collection does not exist. The problem is, I have to send it to a bunch people. In this private procedure, I'd like to continue do some automation on these two open workbooks. I get an error code 5941 requested member does not exist. You can use either a Workbook name or Workbook number.
I have the following code, however, it gives me an error Object required Error 424 the last line where I try to activate a window. You may wonder why the w. So instead of have to point to a particular formfields with: ActiveDocument. These workbooks use the same worksheet name. If you were to show all of the code, more pertinent advice could be given. I am stumped on this one, however. Bonjour, I wrote this code but an error message said that it's wrong.
Activate, and when I ran the Macro Excel crashed. You do not need to activate workbook to deal with any workbook. It will be closed later. Then only things I cannot test which may be where you problem lies is your GetFileName1 funtion and your code to define the wdFname variable. Maybe just a list of basic workbook-switching techniques or commands would be useful.
Assuming those check out, your code does work. Hope that helps, Cindy There should be no need to activate or select anything to do this. They can copy and paste between worksheets. I am assuming that 'Activate' is the correct teminology!! Paste End Sub but when come to :Windows Filename. Daniel Pineault I am running Access 2003. There were 2 problems in the code the ThisWorkbook. How do I do this so I don't get the error?.
Again, this will not work to open folders you originally opened with explorer. Then you can use those throughout the code when you need to refer to those workbooks. Yesterday my boss told me, he cannot use it anymore, that it gives him some errors. Jerry I just tested your code and it work fine! Start with a blank canvas and think linearly. Declared objects can be just about anything, including multiple child objects. End Sub But it didn't work. Let us see the another example to understand the accessing the workbooks using objects.
They cannot mistype any names then. Is there any way to either 1 get rid of these lines of code and still have my macros work, or 2 make these lines more adaptive, so that instead of always referring to Waterfall Template. This site uses Akismet to reduce spam. Thank you both for your time and efforts, it's much appreciated. You can earn a commission for sales leads that you send to us by joining our. Below you can see the code I gathered from the macro recorder.
Normally, the AppActivate statement is used to activate an existing application based on its title. I want the macro to automatically name the file with the contents of cell Z1. However, when run for a second time with a new topic with 'Help Topics. I have attached a sample file. Thanks, Randy I'm trying to come up with a solution to calculate the man hours and days worked over multiple sheets.
This is definately a quick question, but I need to select a range. The next time you run the macro, the previously opened window will activate! Thanks so much to all of you who've contributed - I've learned a few useful things along the way. Jerry I don't know what to tell you. As you can see, it's quite complex. The reason this is a pain in the ass is because it obviously restricts my ability to rename the workbook or save it as anything other than Waterfall Template. Is there any method to achieve this without selecting the cells.
This same code works fine in Excel 2004 on the Macintosh. In order for me to do it on the 75-100 files I have at any given time, I need to open one, run the macro, close and save, then open the next one. So things have changed, at least a bit, since 1995! So the cells I want to mirror are in the proposal sheet cells B32 x F51. I have several reports that I create from code using Word and need to copy and paste information from Word document to another without the user seeing the Word window. Why in the first instance of opening the workbook in earlier procedures, with no. Someone has any idea of what could be the problem? I have upgraded to Word 2007 from word 2003 and have the following vba code in an Access db that worke under 2003 but will not work now. Both files are opened by another non-Excel program using Panorama database software - I could amend that procedure to open tester from FileList but that would lead to other problems perhaps even more worrying.
The macro works by looping through all your open windows. I have searched and read all the help files. And AppActivate will always error if it doesn't find an exact match, right? I have upgraded to Word 2007 from word 2003 and have the following vba code in an Access db that worked under 2003 but will not work now. My excel file will contain more than one tab. Thanks in advance for your help. Any help would be greatly appreciated. When you run the macro normally, everything else functions properly, but the data is not refreshed.