Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
I have a vba script that I use for the option "clear cell" from a list box. Now I want it to be able to clear cells in other sheets aswell. My script looks like this: If LCase(.Value) = LCase("clear choices") Then Selection.Offset(1, -2).ClearContents Selection.Offset(0, 0).ClearContents etc.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
worksheets("MySheet").range("A1").offset(1,-2).clearcontents
HTH, -- Gary Brown If this post was helpful to you, please select 'YES' at the bottom of the post. "Calle" wrote: Hi! I have a vba script that I use for the option "clear cell" from a list box. Now I want it to be able to clear cells in other sheets aswell. My script looks like this: If LCase(.Value) = LCase("clear choices") Then Selection.Offset(1, -2).ClearContents Selection.Offset(0, 0).ClearContents etc.... worksheets("MySheet").range("A1").offset(1,-2).clearcontents |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks for your help. I will try it when I come home :)
|
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thx gary, it worked great.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Sheet to new Sheet and clear cells on original sheets | Excel Discussion (Misc queries) | |||
Transfer a name from one cell to another but leave clear if clear? | Excel Worksheet Functions | |||
Copy sheet and clear cells on new sheet at sametime. | Excel Programming | |||
Clear all cell in a sheet | Excel Programming | |||
disable excell sheet cell from VB Script | Excel Programming |