Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Listbox's, .Enabled and .Visible do not work

I do not see why this will not work.
'================
If CheckBox1 = True Then
ListBox1.Visible = False 'Use Visible or Enabled, neither work
'code here
end if
'=============
When this works fine
'=============
If CheckBox1 = True Then
CheckBox2.Visible = False
CheckBox3.Visible = False
End If
'=============

Thanks in advance!
--
Regards

Rick
XP Pro
Office 2007

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Listbox's, .Enabled and .Visible do not work

Rick S,

If on a form try Userform1.listbox1.visible=false
If on a worksheet then Sheets("sheet1").listbox1.visible=false

"Rick S." wrote:

I do not see why this will not work.
'================
If CheckBox1 = True Then
ListBox1.Visible = False 'Use Visible or Enabled, neither work
'code here
end if
'=============
When this works fine
'=============
If CheckBox1 = True Then
CheckBox2.Visible = False
CheckBox3.Visible = False
End If
'=============

Thanks in advance!
--
Regards

Rick
XP Pro
Office 2007

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Listbox's, .Enabled and .Visible do not work

Yes it is on a Form and "Userform1.listbox1.visible=false" did not work either?

I can use the toolbox, set the visible value to False then load the form and
it is not visible. I just can't do it in a macro.

On the opposite side, I can not make the listbox visible if I turn it off
from the toolbox.

Crazy man! The whole world is crazy!

--
Regards

Rick
XP Pro
Office 2007



"JRForm" wrote:

Rick S,

If on a form try Userform1.listbox1.visible=false
If on a worksheet then Sheets("sheet1").listbox1.visible=false

"Rick S." wrote:

I do not see why this will not work.
'================
If CheckBox1 = True Then
ListBox1.Visible = False 'Use Visible or Enabled, neither work
'code here
end if
'=============
When this works fine
'=============
If CheckBox1 = True Then
CheckBox2.Visible = False
CheckBox3.Visible = False
End If
'=============

Thanks in advance!
--
Regards

Rick
XP Pro
Office 2007

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Listbox's, .Enabled and .Visible do not work

Problem solved!
I simply had to pull my head from out of my behind!
The code was in the wrong part of the macro to know when the event occured.

Please keep the laughter to a dull roar, I still have work to do! ;)

--
Regards

Rick
XP Pro
Office 2007



"Rick S." wrote:

I do not see why this will not work.
'================
If CheckBox1 = True Then
ListBox1.Visible = False 'Use Visible or Enabled, neither work
'code here
end if
'=============
When this works fine
'=============
If CheckBox1 = True Then
CheckBox2.Visible = False
CheckBox3.Visible = False
End If
'=============

Thanks in advance!
--
Regards

Rick
XP Pro
Office 2007

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Listbox's, .Enabled and .Visible do not work

Who's laughing, I've been there myself. I'm cheering for you.

"Rick S." wrote:

Problem solved!
I simply had to pull my head from out of my behind!
The code was in the wrong part of the macro to know when the event occured.

Please keep the laughter to a dull roar, I still have work to do! ;)

--
Regards

Rick
XP Pro
Office 2007



"Rick S." wrote:

I do not see why this will not work.
'================
If CheckBox1 = True Then
ListBox1.Visible = False 'Use Visible or Enabled, neither work
'code here
end if
'=============
When this works fine
'=============
If CheckBox1 = True Then
CheckBox2.Visible = False
CheckBox3.Visible = False
End If
'=============

Thanks in advance!
--
Regards

Rick
XP Pro
Office 2007

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
2 Listbox's not working macroplay Excel Programming 3 August 13th 06 09:43 AM
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False Joe HM Excel Programming 0 August 3rd 06 07:46 PM
Visible rows and functions that work tracy Excel Worksheet Functions 2 August 19th 05 05:25 AM
Listbox's and retaining data when closing eklarsen[_6_] Excel Programming 0 May 7th 04 05:25 AM
LISTBOX'S GREGORY Excel Programming 3 December 1st 03 01:50 PM


All times are GMT +1. The time now is 06:47 AM.

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

About Us

"It's about Microsoft Excel"