Writing MACRO

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HELP! I'm trying to write a macro that will let the user jump to another
worksheet, select a value in a cell (which may be different each time) and I
would like the macro to input the selection on the original worksheet. The
worksheets are in the same workbook.
 
You can reference a cell directly from another worksheet or workbook.
Is that what you want to do? Just type the "=" in the cell you want
to add the value to (we'll call that Worksheet A). Then browse to the
cell in the other worksheet (worksheet B) and click on it.... the
reference to that cell will be in Worksheet A... and any time you
modify the value in Worksheet B the value will also be modified in
Worksheet A.

Sorry if I'm way off track with what you are asking...
 
Have use ever used a userform in VBA. The Refedit feature will allow you to
select a cell in a workbook.

In the VBA window
1) Insert Userform
2) Select Toolbox (hammer and wrench icon)
3) Place Refedit on userform
4) Place command button on userform
5) double click control button so code window opens. Put in code
userform1.hide (returns to main module)

The VBA code is
userform1.Refedit1.show

mycell = userform1.Refedit1.value
 

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

Back
Top