Prev: Show / Hide items in Pivot Table as required
Next: How To Remove VBA Code For Distribution of an Excel Sheet
From: Steven on 27 May 2010 16:27 When you start a function for example: = you can select a different file using Window on the menu bar or the file icon on the task bar to select a cell in a different file. My question is ; is there a way to start the function for example with: = .... and then click a command button on the sheet where the code on the attched macro is to: Windows("ExcelFile").Activate and have it go to the window of the "ExcelFile" and then select the cell you want to reference and hit -Enter- and have it function properly. When I start with = it will basically lock the CommandButton on the sheet and therefore the macro does not run. Is there a way to make this work? Thank you, Steven
From: JLGWhiz on 27 May 2010 18:01
The short answer is no. You cannot do what you describe. However, You can use event code to call a macro when a certain cell is double clicked or right clicked, or the cell value is changed or a different cell is selected. See Chip Pearson's page: http://www.cpearson.com/excel/Events.aspx "Steven" <Steven(a)discussions.microsoft.com> wrote in message news:65610E5D-D28C-4A55-91F8-CD71E136DFBE(a)microsoft.com... > When you start a function for example: = > you can select a different file using Window on the menu bar or the file > icon on the task bar to select a cell in a different file. My question is > ; > is there a way to start the function for example with: = .... and then > click > a command button on the sheet where the code on the attched macro is to: > Windows("ExcelFile").Activate and have it go to the window of the > "ExcelFile" > and then select the cell you want to reference and hit -Enter- and have it > function properly. When I start with = it will basically lock the > CommandButton on the sheet and therefore the macro does not run. Is there > a > way to make this work? > > Thank you, > > Steven |