Return a userdefined cell reference from a dialog

 2000-02-05    Dialogs    2    195

If you want a user to respond with a cell reference in your custom dialog by selecting cells in a worksheet, you follow these simple steps:

  1. Insert a dialog sheet in the workbook
  2. Add an editbox for the cell reference
  3. Edit the properties for the editbox by doubleclicking it.
  4. In the properties dialog (Control-sheet) you can apply that the editbox is going to contain a cell reference
  5. Close the dialog.
When the user activates the editbox in your custom dialog he/she will be able to select a cell reference by clicking in the worksheet behind the dialog and select one or more cells. The cell reference will automatically be filled in the editbox.

In Excel97 or later you would use the RefEdit control instead of an EditBox control.