ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Writing MACRO (https://www.excelbanter.com/excel-programming/390659-writing-macro.html)

Lisa

Writing MACRO
 
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.
--
Lisa

[email protected]

Writing MACRO
 
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...


joel

Writing MACRO
 
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


"Lisa" wrote:

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.
--
Lisa



All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com