ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ??? Public Sub code jump to Private Sub Code (https://www.excelbanter.com/excel-programming/383378-public-sub-code-jump-private-sub-code.html)

Jaylin

??? Public Sub code jump to Private Sub Code
 
I have tried to run a Public sub code, but it keeps jumping to a private
combo box sub even I did not have a code written for this stop

Would appreciate expertise in the problem
--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******

Martin Fishlock

??? Public Sub code jump to Private Sub Code
 
Hi Jaylin

Could you post your code and also how are you running the sub?
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Jaylin" wrote:

I have tried to run a Public sub code, but it keeps jumping to a private
combo box sub even I did not have a code written for this stop

Would appreciate expertise in the problem
--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******


Bob Phillips

??? Public Sub code jump to Private Sub Code
 
You are probably changing something in the combobox from without the sub,
which is triggering the combobox event.

Best show the code.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jaylin" wrote in message
...
I have tried to run a Public sub code, but it keeps jumping to a private
combo box sub even I did not have a code written for this stop

Would appreciate expertise in the problem
--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******




Jaylin

??? Public Sub code jump to Private Sub Code
 
THANKS A MILLION TO ALL

Private Sub ComboBox1_Click()
n = Cells(6, 6)

Select Case n
Case 1
Application.Goto Reference:=Worksheets("IB input").Range("d35"), _
Scroll:=True
Case 2
Application.Goto Reference:=Worksheets("IB input").Range("d62"), _
Scroll:=True

End Select

End Sub


The following is the Public sub:
Sub Getdata()

***There is a section of code that is for logging on a database server here***
Worksheets("Txn").Select
HRETRIEVE = EssVRetrieve("Txn", Null, 1)


Worksheets("Rev").Activate
HRETRIEVE = EssVRetrieve("Rev", Null, 1)


Worksheets("RPT").Activate
HRETRIEVE = EssVRetrieve("RPT", Null, 1)


Worksheets("MTD").Activate
HRETRIEVE = EssVRetrieve("MTD", Null, 1)
Worksheets("Top List").Activate

MsgBox ("RETRIEVE DONE")

End Sub




--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******


"Jaylin" wrote:

I have tried to run a Public sub code, but it keeps jumping to a private
combo box sub even I did not have a code written for this stop

Would appreciate expertise in the problem
--
Thanks a million for your time and expert advice :-)
Jaylin
*****Jaylin Message ended*******



All times are GMT +1. The time now is 11:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com