LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code for ComboBox

Put gotoDlist in the same module as Dlist_Change

--
Regards,
Tom Ogilvy



"Rob" wrote in message
...
Thanks Jim, I tried that and I keep getting "Sub or Function not defined"

"Jim Thomlinson" wrote:

Private Sub DList_Change()
Call GoToDList
End Sub


Sub GoToDList()
Dim DNum
DNum = DList.Value

If DNum < "0" Then
Range("A" & DNum).Activate
End If

DList.Value = "0"
End Sub


--
HTH...

Jim Thomlinson


"Rob" wrote:

I have a ComboBox and Below is the code for it. The Code works
perfectly as
it should; there is absolutely no problems with the code, but here's my
quandry...

When I use,

Private Sub DList_Change()
Dim DNum
DNum = DList.Value

If DNum < "0" Then
Range("A" & DNum).Activate
End If

DList.Value = "0"
End Sub

It works

When I do this....

Private Sub DList_Change()
ThisWorkbook.GoToDList
End Sub

and the code for GoToDList is...

Sub GoToDList()
Dim DNum
DNum = DList.Value

If DNum < "0" Then
Range("A" & DNum).Activate
End If

DList.Value = "0"
End Sub


It doesn't work at all, I keep getting errors to debug. I don't
understand;
I use the exact same code.

Thanks Very Much In Advance,
Rob



 
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
combobox code [email protected] uk Excel Discussion (Misc queries) 0 December 20th 09 06:21 PM
combobox code [email protected] uk Excel Discussion (Misc queries) 0 December 20th 09 08:28 AM
combobox code [email protected] uk Excel Discussion (Misc queries) 2 December 19th 09 08:37 AM
ComboBox code Alexandre Ferreira Excel Worksheet Functions 1 January 11th 07 02:52 PM
Code for ComboBox JLGWhiz Excel Programming 0 September 8th 06 03:40 AM


All times are GMT +1. The time now is 06:24 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"