Hi Stevie, another member who had been helping me previously has graciously offered to take a look as well, so in order not to duplicate effort and possibly waste anyone's time, I'll see if we can find a solution, but in the event that we can't, I will try to post a file or visual example as...
Hi everybody, I have 2 macros that both work perfectly on their own. Each macro is a loop that runs off a different worksheet, so for example Macro 1 (loop 1) runs on sheet 1 and macro 2 (loop 2) runs on sheet 2. I would like to combine these so that rather than loop 2 just looping through all...
Hi p45cal, thanks again for such a quick reply! You have been able accomplish exactly what I was hoping to achieve, except I will need to ether create or input the sheet1 that your macro creates in the active workbook...
It used to be that we started out with a blank template and manually...
Holy Cow!!! That's incredible! I've never even heard of some of the code you used... :)
So, I didn't include the entire workbook and all the macros in it because I've been told previously that doing that when you have a question is bad form, but it might have been a little helpful here in...
Hi p45Cal, thanks for the response! I was starting to think I'd either asked the question poorly or it was just impossible! I realize now that I should have been more clear earlier that the Desired Outcome sheet is a total dummy sheet, the sole purpose is to provide an example of the...
I just noticed that I had some small formatting mistakes on the "Desired Outcome" worksheet... but I don't see how to replace the file and it seems maybe a little unnecessary to upload another copy just for that... Please let me know if I should upload a new copy.
Thanks,
Joe
are you wanting to basically consolidate all the sheet 1s together, all the sheet 2's together etc? so that you start with 3 sheets and end up with 3 sheets? or are you wanting to end up with 1 sheet?
Hello again Chandoo Forum! :)
I think I'm trying to do something very similar to the author of this post...
http://chandoo.org/forum/threads/how-can-i-make-a-more-dynamic-self-filling-table.27263/
... But I don't really understand how the solution provided by Vletm works. I have uploaded a...
Hi Narayan, every it tries to run the Debug line in either sub it gives me a Run-time error '1004: Method of 'VBE' of object'_Application' Failed.
So I tried inserting the 'With Application.FileDialog(msoFileDialogFolderPicker)' code that I'm using to define the Rootfldr variable, but that...
Hi Narayan, i'm sorry for the confusion... i think this should be really, really simple, i don't know why i've been having trouble with it... I will try to explain as clearly as i possibly can...
The module i'm working on contains 3 sub routines; Sub 1(), Sub 2() and Sub 3(). In the first Sub...
i see from that link what you mean about "let" being optional, so i can't explain why it only worked after i used it... I've been trying to figure this out for almost a week and this is the first time it ever "worked"...
before i used it, the values were "erased" after the first sub ended... after i used it, they were not... that was the only thing i changed in my trials and errors...?
i should maybe also mention that the user chooses the file path using folder picker in the first Sub, so the path can't be defined until the user has chosen... if that means anything... this is why i didn't think i could make a constant because i thought i'd have to have the file path...
Hi Narayan, jindon and Marc... sorry about the choppy feeling response, I'd written it before i'd seen your responses, but it seems to have been delayed being posted so it came in after. I think what i'm after is just a variable that behaves like a constant... in the first sub, the user defines...
Well I have no idea how or why, but it seems all you need to do is use "Let" in front of the Variable when you define it... I didn't see anything about this in any of the Microsoft articles or "Help Files" I read... If anyone can explain what's going on in the code below and how or why it works...
Hi Marc, that sounds like what I want to do, but I'm not quite getting it... :(
I am trying to define the variable CYPVS as follows...
Static CYPVS("This is a test") As String
But I keep getting a Type mismatch error...
In real life, I'm hoping to be able to assign a file path to that...
Thanks Stevie, I may end up having to do something like that... I'm trying to learn VBA right now and I guess I'm really just trying to understand scope and exactly how variables work... I thought I understood the concept to be similar to what Narayank991 just posted, but I think I must have...
Hi all! I am working on a macro and I want to be able to pass the values of severable variables (these are mostly file paths... so variables are As String) from the first Sub into the other Subs in the module. I thought if I defined them as Public at the beginning, that would do the trick, but...
So I'm thinking another if statement is the way to go?...
If Dir(PYPVS & "\" & PDFRef) <> "" Then... Is this a good solution?
PDFRef = Sheets("DO NOT DELETE").Range("V" & i).Text
If PDFRef <> "No PVS Found" Then
Set IPDF = Sheets(Pattern1).OLEObjects.Add(Filename:=CYPVS & "\" &...
Can I ask one more quick question about the above code? right after the macro clears out any existing shapes or .pdfs the next part of the code looks in a folder for a new pdf to place in the sheet...
PDFRef = Sheets("DO NOT DELETE").Range("K" & i).Text
Set IPDF =...
Hi everybody, I am using MkDir to create folders and I would like to be able to assign the file path of the folder that was just created to a variable...
so for example, in the code below I'm getting the user to choose the FldrRoot location and then creating several new folders here.
I've just...
I was hoping this method of changing to xlCalculationManual would prevent my formula references from breaking (example #REF) if I was going to replace a worksheet referenced in the formula with an updated sheet, of the same name, but unless I'm doing something wrong, it does not seem to work...
Wow, that is great idea Narayan! Thanks... Looks like my loops are taking about 20 seconds each time to complete, which is better than I thought. Would you have any suggestions around error handling? One area that I think is vulnerable is...
'Probably need to put some error handling in here if...