ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to: reset the pull down menus to item 1 on start up? (https://www.excelbanter.com/excel-programming/271994-re-how-reset-pull-down-menus-item-1-start-up.html)

Brad Patterson

How to: reset the pull down menus to item 1 on start up?
 
Okay, I can do the following ...

Range(²B1²).value = 1
Range(²B3²).value = 1
Range(²B5²).value = 1
Range(²B7²).value = 1

- is there an easier way to make all those values = 1?


patrick molloy

How to: reset the pull down menus to item 1 on start up?
 
examples

Sub Test()
Range("B1:B3").Value = 1
Range("C:C").Value = 3
Range("D3:F5").Value = 4
Range("B4:C6,G4:G7,J4:K6").Value = 5
Range("13:14").Value = 6
End Sub

Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
Okay, I can do the following ...

Range(²B1²).value = 1
Range(²B3²).value = 1
Range(²B5²).value = 1
Range(²B7²).value = 1

- is there an easier way to make all those values = 1?


Leo Heuser[_2_]

How to: reset the pull down menus to item 1 on start up?
 
How to: reset the pull down menus to item 1 on start up?Hi Brad

Range("b1,b3,b5,b7").value=1

will do the job.

--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only, please.

"Brad Patterson" skrev i en meddelelse
...
Okay, I can do the following ...

Range("B1").value = 1
Range("B3").value = 1
Range("B5").value = 1
Range("B7").value = 1

- is there an easier way to make all those values = 1?




All times are GMT +1. The time now is 12:02 AM.

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