zelgar, great catch! I've added the code to delete the sheets. Thank you.
Andrzejek, well said. Never again will I take lightly any advice from the wise wizards of TT! [thumbsup2]
combo, thanks for elaborating so I have an understanding of why Excel is behaving the way it is.
All of you: Thank...
combo, I did not mention in my previous post, but that's exactly why I did. I printed the codename to the .txt file just like you've written it. That's how I know the codename for each imported sheet is blank, or "". That is what leads me to my question: Does anyone know why the newly added...
Andrzejek, sorry I did not try this previously, it's a fantastic trick. I was able to drill down to the problem with your .txt file method by printing the variable values in the SUMIF3D sub. When y did not print at all, I knew that the If statement before y is introduced was never equaling...
SkipVought, good idea calling them both from a 3rd sub, but that did not work either.
combo, I added the msgbox code exactly where you've placed it, and this time the SUMIF3D sub DID execute. Does it have something to do with Excel being able to stop before entering the SUMIF3D procedure? This...
Hi, Combo, so thankful for your input. I know the SUMIF3D code does not execute because the Rollup tab values all remain zero after clicking the button and importing the files. However, it WILL execute if I do one of the following: 1) I go into the SUMIF3D after I've clicked the button, imported...
SkipVought, I want to add - in case I was unclear - that the SUMIF3D procedure DOES run on it's own, but it DOES NOT run when it is called from within the Import_Properties sub. That is the issue. I am trying to figure out why it will not run from within the Import_Properties sub. The...
SkipVought, I didn't realize that is what you were asking me; I am truly sorry for my misunderstanding! I am very grateful for you continuing to lend your time to help me. This link has the Rollup file with 4 imported tabs. Please let me know how else I can...
SkipVought, here is the rollup tool and 4 test files to import into the rollup tool. I've never uploaded a file to this site, so I hope I did it right
http://files.engineering.com/getfile.aspx?folder=9a257a5d-5388-4b6d-925e-4dc801a777f3&file=Rollup_Tool_Web_Version.xlsb...
SkipVought: All of the Import_Properties code executes and works when I click the button EXCEPT for the SUMIF3D portion of the code.
Andrzejek: when I put a break point on the SUMIF3D line and I click the button, code stops at the break point. Then, when I continue it from the break point, the...
I mean that all of the cells on the Rollup tab where the SUMIF3D should be putting values remain zero after the code is run which is what they are before the user clicks the button when no data has been imported yet.
When the button is clicked, the Import_Properties code runs. I right-clicked the button and assigned the Import_Properties macro to it. I know it is assigned correctly because the macro runs when I click the button; it just doesn't play the SUMIF3D sub as it should unless I play from within the...
Hi SkipVought. I have a tab whose codename is Rollup. It should run, but it doesn't! For some reason it only works when I step through or press play from within the code window. I need it to work when the user presses the button.
Hey zelgar. Thanks for replying. I tried your suggestion, and I got an "Object doesn't support this property or method" error when running it. I put Rollup in the parenthesis of the sub header Sub SUMIF3D(Rollup) which required me to also put it in parenthesis after it's called in the...
Hi all,
I've been wrestling with Excel for a few days on this one, and I'm hoping someone can end my misery.
I have a sub (Import_Properties) that is played when the user clicks a button. After the user selects the files to import, the code transfers the data to the main workbook. After each...
Hi Andrzejek, thanks for taking a look. I originally had used the With...End Withs, but I kept reading online regarding error 462 that it's best to type everything out, fully qualified.
Anyway, I cleaned the code up, not changing anything really, and it is all of a sudden working!?!? Here is...
Hello all,
I've tried so many things to get this to work, but I cannot figure it out. Below is my latest code. I have a spreadsheet that pastes a table into Word and does some formatting to the Word document. I've never used VBA in Word before. The code always works the first time but breaks at...
Hi SkipVought,
Thank you for your response. I was able to work around the problem by clearing all of the data in the workbook before closing it. I've never encountered an issue where a workbook that I was not saving took so long to close. I shaved 45 seconds off of the total run time just by...
Hi all,
I've created a tool in Excel that imports data from a raw data file that the user selects. When the tool has gotten the data it needs it uses this line to close the raw data file:
Workbooks(FileName).Close False
FileName is the name of the raw data file the user selected.
I've set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.