I apologize, In my previous post I meant "Public CompareFile as String" and not CopyFile.
So here is my userform:
And this is my module:
All of these have used in several other Sub(s) and I didn't want to have to keep re-typing them.
The sub finds a column header and selects the used rows. I am trying to determine matches based on the values of these cells using the vloopup and then put in "CUS" in the adjacent cells.
Thanks again for you help, I hope this is more helpful.
P.S. If I get rid of the vlookup and just have:
and the workbook I am trying to reference in the vloopup becomes active instead of the destsheet. To me this tells me the variable is properly assigned.
Bookmarks