473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Passing an array value to the textbox, returns null. Why?

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.

*** Sent via Developersdex http://www.developersdex.com ***
Jan 22 '07 #1
2 1200
"VBcoder vb" <vb*********@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I have a function USTRST where it finds the value of USPoP_CityA as
shown below (the value is searched from a database)
You have a function called USTRST!?!?!? You *really* need to start coming up
with some more descriptive names. :-)
Redim P_Lline(9)
USPoPA_City = Cells(adrsX, adrsY + 5)
Ditto for your var names also :-)
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.
Put a breakpoint on the line (push F9) above and mouse over each variable to
see what value they hold.

Michael
Jan 22 '07 #2
"VBcoder vb" <vb*********@yahoo.comschrieb
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)

Is this is a VB.Net application? Doesn't look as if.
Armin
Jan 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rene van Hoek | last post by:
Hi, I am using Xalan 1.8.0 and Xerces 2.6.0 in C++. I have an XML document which I first transform into an other XML document using an XSL styelsheet. Then I want to parse with XPathEvaluator...
8
by: Mike S. Nowostawsky | last post by:
I tried using the "toUpperCase()" property to change the value of an array entity to uppercase BUT it tells me that the property is invalid. It seems that an array is not considered an object when...
6
by: DeepaK K C | last post by:
Could anybody tell me how to pass array to a function by value? -Deepak
3
by: Zoury | last post by:
Good day! :O) I have the following code : //*** using System; using System.Windows.Forms; <snip>
1
by: James G. Beldock | last post by:
I have seen the following behavior: when issuing a Page.FindControl() for a control which exists in an item template (from within an ItemDataBound() event, for example), I get nulls back...
7
by: Ohad Asor | last post by:
Hello all, I have an ASP.NET page I've written using VS.NET2003, which have a ListBox in it. When I press a button in the form, I try to get the selected item in the list by calling...
11
by: MLH | last post by:
I have 2 lines in a procedure that assign MyVariant a value - line #238 and line #491. When line #238 runs, the value is 152. When line #491 runs, the DLookup function returns Null. I would expect...
14
by: mast2as | last post by:
Hi everyone, I am trying to implement some specs which specify that an array of parameter is passed to a function as a pointer to an array terminated by a NULL chatacter. That seemed fairly easy...
3
by: shobu | last post by:
passing array checkbox value and update the database <?include 'dbconnect.php'; error_reporting(0);$update_qr="update...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.