Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation and active cell
Hi everybody, I am working for 1 NGO in Bosnia for Demining. I almost finished one expenses follow up excel tool but I am blocked at 1 point. If someone can help, I would really appreciate... Explanation: See below the VBA writing for validation list. I would need to replace below the _=$B33$_ by *an absolute reference of 1 active cell*. (active cell should be located 1 row higher than the start with Range("B" & ActiveCell.Row).Select Range("B" & ActiveCell.Row).Select With Selection.Validation ..Delete ..Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=$B$33" ..IgnoreBlank = True ..InCellDropdown = True ..InputTitle = "" ..ErrorTitle = "" ..InputMessage = "" ..ErrorMessage = "" ..ShowInput = True ..ShowError = True End With Range("B" & ActiveCell.Row).Select Background info for this: I have different budget lines and use the "go to" same validation to select from the active cell the same budget lines on my worksheet and unhide them. Do not know if it is possible. If you have a solution it would be great. Michael -- mikla ------------------------------------------------------------------------ mikla's Profile: http://www.excelforum.com/member.php...o&userid=37179 View this thread: http://www.excelforum.com/showthread...hreadid=568938 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation and active cell
Try:
Formula1:="=" & Range("B" & ActiveCell.Row-1).Address HTH, Bernie MS Excel MVP "mikla" wrote in message ... Hi everybody, I am working for 1 NGO in Bosnia for Demining. I almost finished one expenses follow up excel tool but I am blocked at 1 point. If someone can help, I would really appreciate... Explanation: See below the VBA writing for validation list. I would need to replace below the _=$B33$_ by *an absolute reference of 1 active cell*. (active cell should be located 1 row higher than the start with Range("B" & ActiveCell.Row).Select Range("B" & ActiveCell.Row).Select With Selection.Validation Delete Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=$B$33" IgnoreBlank = True InCellDropdown = True InputTitle = "" ErrorTitle = "" InputMessage = "" ErrorMessage = "" ShowInput = True ShowError = True End With Range("B" & ActiveCell.Row).Select Background info for this: I have different budget lines and use the "go to" same validation to select from the active cell the same budget lines on my worksheet and unhide them. Do not know if it is possible. If you have a solution it would be great. Michael -- mikla ------------------------------------------------------------------------ mikla's Profile: http://www.excelforum.com/member.php...o&userid=37179 View this thread: http://www.excelforum.com/showthread...hreadid=568938 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation and active cell
:) T'anks a million. It works perfectly. Michael -- mikla ------------------------------------------------------------------------ mikla's Profile: http://www.excelforum.com/member.php...o&userid=37179 View this thread: http://www.excelforum.com/showthread...hreadid=568938 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
Validation of input against the active directory | Excel Worksheet Functions | |||
Active Cell & Data Validation question | Excel Programming | |||
Active Cell / Data Validation question | Excel Programming | |||
Move Active Cell after Data Validation List | Excel Programming |