Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Hiding A TextBox On A UserForm Under A CommandButton

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hiding A TextBox On A UserForm Under A CommandButton

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Hiding A TextBox On A UserForm Under A CommandButton

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hiding A TextBox On A UserForm Under A CommandButton

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Hiding A TextBox On A UserForm Under A CommandButton

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hiding A TextBox On A UserForm Under A CommandButton

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CommandButton displaced after hiding/unhiding rows scelle Excel Programming 0 July 25th 05 10:37 PM
CommandButton - Userform Marcia3641 Excel Discussion (Misc queries) 2 July 21st 05 06:39 PM
Simple Question: Hiding a CommandButton JasperBlaas Excel Programming 3 August 9th 04 01:28 PM
Combobox with Commandbutton in Userform! Stift[_16_] Excel Programming 7 May 28th 04 08:50 AM
Combobox with textbox and Commandbutton Stift[_4_] Excel Programming 4 May 19th 04 11:57 PM


All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"