Hello everyone! New to the forum here, but been lurking for about a week. I've already picked up lots of helpful information here, thanks to everyone who contributes!
GOAL:
I'm trying to create a macro that will sort a particular column alphabetically across many different excel documents. All of the documents have the exact same amount of columns, but vary in row length, and have different names. I used the record macro function to do this, as I'm still very much a newbie in using Visual Basic:
ISSUE:
The problem is that this will only work with a worksheet with the name of "xlWorksheet" otherwise I receive an error reading: "Run time error '9': Subscript out of range"
I need this macro to work across numerous documents with different names, all of which are formatted the same.
It is part of a larger macro which also formats, highlights, and adds data, all of which is working.
CONCLUSION:
I'm sure there is a very simple fix to the code that will allow me to access whatever the current worksheet is, instead of just the one that is named in the code.
So far I've tried changing it to ThisWorkbook instead of ActiveWorkbook, but no luck.
All help will be very much appreciated!
Cheers!
Bookmarks