|  

» Return a userdefined cell reference from a dialog using VBA in Microsoft Excel

VBA macro tip contributed by Erlandsen Data Consulting offering Microsoft Excel Application development, template customization, support and training solutions
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.


Rate This Tip
12 34 5
Rating: 2.46     Views: 29914
No comments have been submitted.
Click here to post comment
For Registered Users
Name
Comment Title
Comments