Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
How to prompt a user to select only 1 cell-location type using RefEdit when a form is running? For example: I have a form with 1 RefEdit (RefEdit1) and 2 TextBoxes (txtCellCurrentLocation and txtSheetCurrentLocation) 1. When the form start running it will get the current cell location and it will show the results on txtCellCurrentLocation and txtSheetCurrentLocation 2. After that, the RefEdit tool can be clicked to select another new current location, *Also RefEdit1 value has to be only 1 cell located only in Columns C, E and G. *If the user select a range of cells it will get a message to try again and select only 1 cell or quit form. 3. After getting a new good value for RefEdit1 then txtCellCurrentLocation and txtSheetCurrentLocation textboxes will be updated in the form. ================= Private Sub RefEdit1_BeforeDragOver(Cancel As Boolean, ByVal Data As MSForms.DataObject, ByVal x As stdole.OLE_XPOS_CONTAINER, ByVal y As stdole.OLE_YPOS_CONTAINER, ByVal DragState As MSForms.fmDragState, Effect As MSForms.fmDropEffect, ByVal Shift As Integer) End Sub Private Sub TxtCellCurrentLocation_Change() End Sub Private Sub TxtSheetCurrentLocation_Change() End Sub Private Sub UserForm_Initialize() TxtSheetCurrentLocation = ActiveSheet.Name TxtCellCurrentLocation = ActiveCell.Address End Sub ============ Thanks Coco |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advanced Filter - Copying to location other than current sheet? | Excel Discussion (Misc queries) | |||
Current Cell location | Excel Worksheet Functions | |||
Macro - save to current location vs excel default location | Excel Discussion (Misc queries) | |||
VBA to specify chart location as obj in current sheet? | Charts and Charting in Excel | |||
Saving a TXT file keeping its current location | Excel Programming |