Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Combo box error

Hi all, what am I doing wrong with the vb code below.
I am trying to get the rowsource from a sheet called "mainsheet"
and the range f22 to f23


If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31")

ComboBox1.Visible = True

End If

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Combo box error

It's a string property, so try

If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31").Address(,,,True)

ComboBox1.Visible = True

End If


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Greg" wrote in message
...
Hi all, what am I doing wrong with the vb code below.
I am trying to get the rowsource from a sheet called "mainsheet"
and the range f22 to f23


If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31")

ComboBox1.Visible = True

End If

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Combo box error

ComboBox1.RowSource = "Sheet1!F22:F31"

HTH
--
AP

"Greg" a écrit dans le message de news:
...
Hi all, what am I doing wrong with the vb code below.
I am trying to get the rowsource from a sheet called "mainsheet"
and the range f22 to f23


If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31")

ComboBox1.Visible = True

End If

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Combo box error

Thanks Bob and Ardus

It working well now.

Greg
"Greg" wrote in message
...
Hi all, what am I doing wrong with the vb code below.
I am trying to get the rowsource from a sheet called "mainsheet"
and the range f22 to f23


If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31")

ComboBox1.Visible = True

End If

Thanks



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
Excel combo box Error Needhelp Excel Discussion (Misc queries) 0 April 8th 08 11:56 PM
Combo box VBA error R Ormerod Excel Discussion (Misc queries) 5 October 5th 07 03:34 PM
error message on combo box joe Excel Programming 3 August 5th 04 09:18 AM
combo box error-not enough resources Brian Excel Programming 2 October 2nd 03 01:22 AM
Combo Box causes system resources error David Brett Excel Programming 0 July 14th 03 05:19 AM


All times are GMT +1. The time now is 03:59 AM.

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"