Skylar
asked on
Need help with modifying my VBA code
I need help with changing two thing in my code.
one of them is instead of hard coded path.
I need help to modify this, so that instead of this fixed path. I would get a prompt to select the path from the directory. I searched google but got confused with too many different answers that i could not put to use.
the second help i need is that my current range is static from A2 to A13 i want to change is to dynamic so that if there is more value it expands the range and if the values are not there then it collapse the range.
I do not know how to change this little code below
one of them is instead of hard coded path.
Const basePath As String = "c:\Users\Skylar\Downloads\Factory"
I need help to modify this, so that instead of this fixed path. I would get a prompt to select the path from the directory. I searched google but got confused with too many different answers that i could not put to use.
the second help i need is that my current range is static from A2 to A13 i want to change is to dynamic so that if there is more value it expands the range and if the values are not there then it collapse the range.
I do not know how to change this little code below
Dim ws As Excel.Worksheet
Set ws = wb.Worksheets(2)
Dim rng As Excel.Range
Set rng = ws.Range("A2:A13")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER