ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I prompt the user to select a cell? (https://www.excelbanter.com/excel-programming/379736-how-do-i-prompt-user-select-cell.html)

[email protected]

how do I prompt the user to select a cell?
 
Hello,
please can someone help me with the following ...

My macro needs to ask the user which worksheet column they want
totalled. I could use InputBox to ask them to supply the letter of
the column but I would prefer it if they could click on a cell in the
column they choose. Eg in response to a macro prompt they click on
G4 and the macro then totals the G column.

Your help would be appreciated.

Cath


Gord Dibben

how do I prompt the user to select a cell?
 
Cath

'your code here

Set srng = Application.InputBox(prompt:= _
"Select G4 or any other cell", Type:=8)

'rest of code to do something with the selection


Gord Dibben MS Excel MVP

On 19 Dec 2006 15:14:22 -0800, wrote:

Hello,
please can someone help me with the following ...

My macro needs to ask the user which worksheet column they want
totalled. I could use InputBox to ask them to supply the letter of
the column but I would prefer it if they could click on a cell in the
column they choose. Eg in response to a macro prompt they click on
G4 and the macro then totals the G column.

Your help would be appreciated.

Cath




All times are GMT +1. The time now is 12:45 PM.

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