ListFillRange
I have the following code in a procdu
Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks |
ListFillRange
After I named a range "wrkshtrng", this line...
Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address worked fine for me. Rick "ranswrt" wrote in message ... I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks |
ListFillRange
"wrkshtrng" is on a different sheet than the sheet with the listbox in, does
that make a difference? "Rick Rothstein (MVP - VB)" wrote: After I named a range "wrkshtrng", this line... Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address worked fine for me. Rick "ranswrt" wrote in message ... I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks |
ListFillRange
Did you try all the other suggestions at your earlier post?
Just curious. ranswrt wrote: I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks -- Dave Peterson |
ListFillRange
Yes
"Dave Peterson" wrote: Did you try all the other suggestions at your earlier post? Just curious. ranswrt wrote: I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks -- Dave Peterson |
ListFillRange
I call this procedure alot when I'm running other procedu
Sub stopautocalc() With Application .ScreenUpdating = False .EnableEvents = False .Calculation = xlCalculationManual End With End Sub Then I turn them back on again. Could this have anything to do with it? "Dave Peterson" wrote: Did you try all the other suggestions at your earlier post? Just curious. ranswrt wrote: I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks -- Dave Peterson |
ListFillRange
I don't think so.
You really tried: Sheets("Home").OLEObjects("ListBox1").ListFillRang e _ = Range("wrkshtrng").Address(external:=true) Or being more specific: Sheets("Home").OLEObjects("ListBox1").ListFillRang e _ = worksheets("somesheet").Range("wrkshtrng").Address (external:=true) ranswrt wrote: I call this procedure alot when I'm running other procedu Sub stopautocalc() With Application .ScreenUpdating = False .EnableEvents = False .Calculation = xlCalculationManual End With End Sub Then I turn them back on again. Could this have anything to do with it? "Dave Peterson" wrote: Did you try all the other suggestions at your earlier post? Just curious. ranswrt wrote: I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks -- Dave Peterson -- Dave Peterson |
ListFillRange
I changed
Sheets("Current DB") to worksheets("Current DB") and added (external:=True) That seemed to have fixed the problem. Thanks for your help "Dave Peterson" wrote: I don't think so. You really tried: Sheets("Home").OLEObjects("ListBox1").ListFillRang e _ = Range("wrkshtrng").Address(external:=true) Or being more specific: Sheets("Home").OLEObjects("ListBox1").ListFillRang e _ = worksheets("somesheet").Range("wrkshtrng").Address (external:=true) ranswrt wrote: I call this procedure alot when I'm running other procedu Sub stopautocalc() With Application .ScreenUpdating = False .EnableEvents = False .Calculation = xlCalculationManual End With End Sub Then I turn them back on again. Could this have anything to do with it? "Dave Peterson" wrote: Did you try all the other suggestions at your earlier post? Just curious. ranswrt wrote: I have the following code in a procdu Sheets("Home").OLEObjects("ListBox1").ListFillRang e = Range("wrkshtrng").Address The listbox window is blank. I have been using: Sheets("Home").OLEObjects("ListBox1").ListFillRang e = "wrkshtrng" But I have been having problems. I don't know if that is the cause of the problems or not. Why is the first code not working? Thanks -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com