Get and Transform aka Power Query Assistance

I know it might be tough to answer without a code snippet, but, when I first went to cleanup this code I tried to set up the mtr, con and wb as their objects. i.e. Dim mtr as worksheet.

It didn't like it. Anyone know why? Edit: Didn't like it at the point of set mtr = Worksheets("Master").
 
As far as activate goes, is it even needed in VBA? Shouldn't all the commands work without the sheet being active?
Precisely.

The problem comes when people do things like this:

Range("A1").Value="Something"

The only way that works (even at a poor level), is to Activate the sheet (where you want range A1), first. Thus many people get in the habit of Activating a particular Worksheet, and then using otherwise unqualified references, like Range and Cells, and crossing their fingers that it works.

You're right - I've not really come across any reason to use Select and Activate, and they shouldn't be used.
 
Compile error or runtime? What's the error?
 
Sorry, I know I gave less than useful info. Give a few minutes to button something up and I should be free to tackle this and clean up the code. Time frame (thankfully) seems to have decompressed.
 

Users who are viewing this thread

Back
Top Bottom