Dear all,
I am preparing a macro which should copare two trial balances. It should also copy the first column - the account number and one more column with balances, wheras the column number depends on the source file. My question is: I would like that the user would click on specific column (or a cell) in any source file on the harddisk and the VBA would be able extract from this link the workbook name (incl. path), worksheet name and the column number of this cell, so that I would be able to set it as a variable and I would be able to work with it.
I would be greatful for any help as I am quite new to VBA.
Hi,
Why not just apply the value obtained with
Application.GetOpenFileName
to a string variable.
You can then use that variable to open the file, then with a Message Box ask the user to select a cell, and then use another variable to capture the selection. e.g.
stAddress = ActiveCell.Address
Regards
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks