Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why do you have a minus sign in the 1st macro?
"BigJimmer" wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's a typo in my post.
"Joel" wrote: Why do you have a minus sign in the 1st macro? "BigJimmer" wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just a guess...
I think it's a display problem. Have you tried minimizing and maximizing the application window--or scrolling up or down. Or toggling screenupdating off then on in your code? Sometimes, that kind of stuff helps. BigJimmer wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.ScreenUpdating was one of the first things I checked as I use
that frequently. I just tried scrolling, and minimizing/maximizing the screen and neither of those had any impact. "Dave Peterson" wrote: Just a guess... I think it's a display problem. Have you tried minimizing and maximizing the application window--or scrolling up or down. Or toggling screenupdating off then on in your code? Sometimes, that kind of stuff helps. BigJimmer wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you swap to a different application, does it help?
If you close (saving your file) and reopen, does it work ok? If you close excel and reopen the file, does it work ok? If you fiddle with the windows display settings (lowering the hardware acceleration), does it work ok? If you change video drivers--or test on a different pc, does it work ok? That's right, I don't have a guess! BigJimmer wrote: Application.ScreenUpdating was one of the first things I checked as I use that frequently. I just tried scrolling, and minimizing/maximizing the screen and neither of those had any impact. "Dave Peterson" wrote: Just a guess... I think it's a display problem. Have you tried minimizing and maximizing the application window--or scrolling up or down. Or toggling screenupdating off then on in your code? Sometimes, that kind of stuff helps. BigJimmer wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Changing application, closing reopening the file/Excel, nothing was making a
difference. I didn't have the chance for trying other PCs yet, and an idea occurred to me. In my routine for displaying the list box, I now have the following , which i don't like from a proramming perspective, though it has resolved the issue until someone else can provde a better solution... with ListBox1 .Visible = True .Visible = False .Visble = True end with "Dave Peterson" wrote: If you swap to a different application, does it help? If you close (saving your file) and reopen, does it work ok? If you close excel and reopen the file, does it work ok? If you fiddle with the windows display settings (lowering the hardware acceleration), does it work ok? If you change video drivers--or test on a different pc, does it work ok? That's right, I don't have a guess! BigJimmer wrote: Application.ScreenUpdating was one of the first things I checked as I use that frequently. I just tried scrolling, and minimizing/maximizing the screen and neither of those had any impact. "Dave Peterson" wrote: Just a guess... I think it's a display problem. Have you tried minimizing and maximizing the application window--or scrolling up or down. Or toggling screenupdating off then on in your code? Sometimes, that kind of stuff helps. BigJimmer wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! -- Dave Peterson -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You know what they call an ugly fix?
A Fix!!! I'd use it <vbg. BigJimmer wrote: Changing application, closing reopening the file/Excel, nothing was making a difference. I didn't have the chance for trying other PCs yet, and an idea occurred to me. In my routine for displaying the list box, I now have the following , which i don't like from a proramming perspective, though it has resolved the issue until someone else can provde a better solution... with ListBox1 .Visible = True .Visible = False .Visble = True end with "Dave Peterson" wrote: If you swap to a different application, does it help? If you close (saving your file) and reopen, does it work ok? If you close excel and reopen the file, does it work ok? If you fiddle with the windows display settings (lowering the hardware acceleration), does it work ok? If you change video drivers--or test on a different pc, does it work ok? That's right, I don't have a guess! BigJimmer wrote: Application.ScreenUpdating was one of the first things I checked as I use that frequently. I just tried scrolling, and minimizing/maximizing the screen and neither of those had any impact. "Dave Peterson" wrote: Just a guess... I think it's a display problem. Have you tried minimizing and maximizing the application window--or scrolling up or down. Or toggling screenupdating off then on in your code? Sometimes, that kind of stuff helps. BigJimmer wrote: Hi, I have some option buttons (for now, Opt1 and Opt2), a listbox (ListBox1) and a command button (Cmd1) on a worksheet. Here is the very basic code I have reduced the option buttons to in trying to debug my issue... Private Sub Opt1_Click() ListBox1.Visible = False Cmd1.Visible - False End Sub Private Sub Opt2_Click() ListBox1.Visible = True Cmd1.Visible = True End Sub When I click Opt1, the list box is not visible. When I then click Opt2, the list box is visible and shows the info I expect. The problem is that I am unable to select any rows in the list, or scroll down the list. The command button works as coded (including error hanndling for no selection in the list). Then, I click Opt1 again, the list is hidden, followed by Opt2, the list is now visible again. This time however, I can now select rows in the list, etc. This pattern repeats, so that if click Opt1, then Opt2 again, I will not be able to use the listbox, and then I can. I have checked that the list box is always set to enabled, that the worksheet itself is not protected, and looked for other settings that I thought might be causing this. I am using Excel 2000. Anyone know why this would happen? Thanks! -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill a multicolumn listbox with data from a range in another works | Excel Programming | |||
It works .... but only 1 time | Excel Programming | |||
Works every second time | Excel Programming | |||
CopyPicture only works second time | Excel Programming | |||
listbox works in form; not imbedded??? | Excel Programming |