Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could toggle the .zorder property.
Me.CommandButton1.ZOrder 1 0 = it's on top 1 = it's on bottom Minitman wrote: Greetings, I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey Dave,
Thanks for the reply. Unfortunately, it appears that ZOrder is not for UserForm controls, unless I am doing something wrong. I'm not sure what happened, but I seem to be in debug mode of some kind and I can't get out. Any ideas? -Minitman On Thu, 25 Aug 2005 18:14:20 -0500, Dave Peterson wrote: You could toggle the .zorder property. Me.CommandButton1.ZOrder 1 0 = it's on top 1 = it's on bottom Minitman wrote: Greetings, I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tested it using a userform.
You may want to post the code (or look in VBA's help). Minitman wrote: Hey Dave, Thanks for the reply. Unfortunately, it appears that ZOrder is not for UserForm controls, unless I am doing something wrong. I'm not sure what happened, but I seem to be in debug mode of some kind and I can't get out. Any ideas? -Minitman On Thu, 25 Aug 2005 18:14:20 -0500, Dave Peterson wrote: You could toggle the .zorder property. Me.CommandButton1.ZOrder 1 0 = it's on top 1 = it's on bottom Minitman wrote: Greetings, I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey Dave,
Found the problem (a typo). ZOrder does indeed work. Thank you. -Minitman On Thu, 25 Aug 2005 22:33:26 -0500, Dave Peterson wrote: I tested it using a userform. You may want to post the code (or look in VBA's help). Minitman wrote: Hey Dave, Thanks for the reply. Unfortunately, it appears that ZOrder is not for UserForm controls, unless I am doing something wrong. I'm not sure what happened, but I seem to be in debug mode of some kind and I can't get out. Any ideas? -Minitman On Thu, 25 Aug 2005 18:14:20 -0500, Dave Peterson wrote: You could toggle the .zorder property. Me.CommandButton1.ZOrder 1 0 = it's on top 1 = it's on bottom Minitman wrote: Greetings, I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know what your typo was, but if you have "option explicit" at the top of
your module, it can make finding some typos easier to find. Option explicit forces you to declare your variables. So if excel finds something that looks like a variable and it's not declared, your code won't compile and you'll be shown the error. (It won't catch them all, but it really helps.) Minitman wrote: Hey Dave, Found the problem (a typo). ZOrder does indeed work. Thank you. -Minitman On Thu, 25 Aug 2005 22:33:26 -0500, Dave Peterson wrote: I tested it using a userform. You may want to post the code (or look in VBA's help). Minitman wrote: Hey Dave, Thanks for the reply. Unfortunately, it appears that ZOrder is not for UserForm controls, unless I am doing something wrong. I'm not sure what happened, but I seem to be in debug mode of some kind and I can't get out. Any ideas? -Minitman On Thu, 25 Aug 2005 18:14:20 -0500, Dave Peterson wrote: You could toggle the .zorder property. Me.CommandButton1.ZOrder 1 0 = it's on top 1 = it's on bottom Minitman wrote: Greetings, I have a TextBox that sits in the same place as a CommandButton. Their visibility is turned on and off with code. It was working until I needed to press the CommandButton to run a subroutine. That is when I discovered that I had to have the TextBox visible to prevent an error from showing up. The problem is that the visible TextBox sits on top of the CommandButton and I need it to be under (covered by) the CommandButton (The CommandButton becomes non visible before the TextBox is needed). Does anyone know how to do this? TIA -Minitman -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CommandButton displaced after hiding/unhiding rows | Excel Programming | |||
CommandButton - Userform | Excel Discussion (Misc queries) | |||
Simple Question: Hiding a CommandButton | Excel Programming | |||
Combobox with Commandbutton in Userform! | Excel Programming | |||
Combobox with textbox and Commandbutton | Excel Programming |