V
VBcoder vb
I have a function USTRST where it finds the value of USPoP_CityA as
shown below (the value is searched from a database)
Redim P_Lline(9)
USPoPA_City = Cells(adrsX, adrsY + 5)
P_Lline(0) = "US " & USPoPA_City (when i return this value in any excel
cell, i get the value of USPoPA_City, in the cell)
Dim city As String
city = "hello"
P_Lline(9) = "test" city & USPoPA_City (when i do this, i get "test
hello" in my text box, and not the value of USPoPA_City.
Then in a public variable i have set
CityA = USPoPA_City (suppose to be "fortworth")
ActiveSheet.OLEObjects("txtbCityA").object.Value = "City A: " & CityA
So when i run my program, i only get "test hello", and not value of the
USPoP_City. I put a breakpoint to see what is being returned, so it
shows that within the funtion the value is null, so that is what is
being passed. But how is that at the same time from the same function i
get fortworth in the excel cell.
I have been stuck on this problem for more then 2 weeks, and cant move
forward. Please help. Thanks.
shown below (the value is searched from a database)
Redim P_Lline(9)
USPoPA_City = Cells(adrsX, adrsY + 5)
P_Lline(0) = "US " & USPoPA_City (when i return this value in any excel
cell, i get the value of USPoPA_City, in the cell)
Dim city As String
city = "hello"
P_Lline(9) = "test" city & USPoPA_City (when i do this, i get "test
hello" in my text box, and not the value of USPoPA_City.
Then in a public variable i have set
CityA = USPoPA_City (suppose to be "fortworth")
ActiveSheet.OLEObjects("txtbCityA").object.Value = "City A: " & CityA
So when i run my program, i only get "test hello", and not value of the
USPoP_City. I put a breakpoint to see what is being returned, so it
shows that within the funtion the value is null, so that is what is
being passed. But how is that at the same time from the same function i
get fortworth in the excel cell.
I have been stuck on this problem for more then 2 weeks, and cant move
forward. Please help. Thanks.