VB Script reference cells for in current table?

Joined
Jun 16, 2017
Messages
1
Reaction score
0
Hi all,
I have a document with a table where the user can enter a values into cells, and then it will run a little VBscript on the entered values and display a result. The VB Script can use the RnCn reference convention to get the values from the correct cells and then to display the calculated result in the correct cells.
However... I'd like the users to be able to copy the table and paste new ones like it into the same document to fill in as well, entering different values into each new table. (this is for traveling workers who need to enter miles, drive times, etc and it calculates totals for them -- so they would need to copy the first table and paste a new table in for each additional day they're working for a particular trip)
The VBScript can work in the initial table -- but not in the new ones that are copied/pasted by the users.
How can I get the VB Script to reference the RnCn cells in each table if these new tables are pasted in such that it can read and then update the right cells?

Thank you,
AriD
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
Without seeing your code it's impossible to say what modifications are needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top