ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Validation Question (https://www.excelbanter.com/excel-discussion-misc-queries/199219-data-validation-question.html)

jwags

Data Validation Question
 
I am trying to set a default selection in a List under Data Validation, so
when the worksheet is opened, a default value is there but the user can
change the value if necessary. Is this possible and if it is, how can this
be done?

Dave Peterson

Data Validation Question
 
Just select the value you want and save the workbook. Next time you open the
workbook, that value should still be there.

If you're saying that you want that default value reset each time the workbook
opens, you could use an auto_open procedure that changes the value.

Option Explicit
Sub Auto_Open()
ThisWorkbook.Worksheets("somesheetnamehere").range ("x9999").value = "MyValue"
End Sub

Change the sheet name and the address of the cell and the value to what you
need.

This does depend on the user allowing macros to run, though.

jwags wrote:

I am trying to set a default selection in a List under Data Validation, so
when the worksheet is opened, a default value is there but the user can
change the value if necessary. Is this possible and if it is, how can this
be done?


--

Dave Peterson


All times are GMT +1. The time now is 01:36 PM.

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