Create A Line Of Code From Varibles?
Oct 29, 2010
I have 30 objects that all need modifiying in the same way. The name of the objects are all the same except for the number increment. e.g.
textbox1, textbox2, text box3, etc
Is there a way I can increment the number using a varible, so that I can avoid repeating the same line 30 times? For example[code]...
View 5 Replies
ADVERTISEMENT
Oct 12, 2009
I am trying to create a procedure which will evaluate a string expression as if it were a line of code...Kind of like what a graphing calculator does when you enter a formula. Does anyone have any experience with this in VB? I have an example of C++ code which uses CodeDom, but I am a bit rusty with my C++!
View 4 Replies
Jan 15, 2012
I am using the given code to copy my database files...it works like a charm in debug mode but as soon as I create a setup, it stops working. The error is
"Database Detach Failed"
I tried checking the code line by line and found that the code does not enter the IF block.I have no idea why.
Public Sub bk()
Try
Dim strDatabasePath As String = My.Computer.FileSystem.CombinePath(My.Application.Info.DirectoryPath, "LIC.mdf")[code].....
View 2 Replies
Apr 26, 2009
I have variables i need in form2, but they are in a function and with in an if statement of that function in form1.
I am currently using this method on form2 to get the variables but it doesn't seem to be working. Is there somthing i have to do to the variables i want to transfer?[code]...
View 1 Replies
May 27, 2009
im trying to get a number/name from the user in 1 form and use that number again in a diffrent forum, but i'm having trouble.
*******************Form One
Dim strName As String '(general )
Private Sub cmdrun_Click()
[code].....
View 2 Replies
Dec 25, 2010
How do I declare a global variable in VB - these variable need to be accessible from all the vb forms. I know how to declare public variable for a specific form. but how do I do this for all the forms in my project.
View 4 Replies
May 17, 2012
I have a string 17:55:88 I want to split this up into the three sections and store them in varibles.IE I would like to have the 88 stored in a varible the 55 in a varible and the 17 in a varible.the following code does what i want, but i dont know how to put the results into their own varibles.
[Code]...
View 2 Replies
Jun 30, 2011
Don't know if I phrased the question right, but Say if you had a form named Form1, and on that form you declared a varible like Dim s as Integer = 0, how do you not refer to that varible when you reference a public sub on that form.
Reason for asking, I stepped through my code and noticed if I call Form1.CalculateField() to calculate some values, my calculations where wrong because the value of s was set to lets say 10 before I launched the second form which I call the above from, any how long story short, when the formm is referenced from another form, it evaluates all varibles declared, which means s was set back to 0.
View 1 Replies
Jan 29, 2009
Is there a way to show the line number of the line of code that caused an exception within a Try...Catch block?
View 5 Replies
May 29, 2010
I am using WebBrowser1.DocumentText to get a websites source code, and then parse a string. I am trying to view the source line by line, and doing it as follows:
[Code]...
However what is displayed is each character from the source code, rather than the line. I am making the client log into a website, and the needed value from the source code is then parsed, so I need to use the WebBrowser type to get the source code.
View 2 Replies
May 8, 2011
I am developing a program where i will download and save an xml file from a url as abc.xml. I open the abc.xml in a datagridview with a dataset without problem.I am confused how can i read raw per raw the datagridview and assign the data in a database table? i am using vb 2008 + msde2005 express.I show the whole content of the xml file in the datagridview with the following [code]I dont know how to create a loop where i can read the datagridview line by line save data in variables (ex.strings) and save it in a databese table?
View 6 Replies
Jan 20, 2010
show me a simple code for downloading a file from internet with a URL,Line by Line with streamreader?
View 6 Replies
Feb 2, 2009
If anybody is having code for comparing files line by line using vb.net.
View 2 Replies
Dec 13, 2009
I have this string just down loaded of a Unix server. I would like to remove the box (0x0A) Unix end line code; then replace it with CR+LF normal ASCII code. Also, I would like to do the replace before I save the data, while it in memory.
View 14 Replies
Oct 25, 2009
I am a beginner and i have a simple question. How can i run code in VB.NET line by line?
Here is an example Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
When i click the button the text "Start" will be displayed in TextBox1 only after the whole event has finished, after the webpage is loaded in RichTextBox1. What i need is the text in TextBox1 displayed before it starts downloading the webpage in RichTextBox1.
View 5 Replies
Oct 12, 2009
have a question about the program jumping to a line of code and using that.Here is an example:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
[code].....
View 1 Replies
Feb 11, 2010
I have created reports that print on my printer via Visual Studio 2008/VB 2008 Basic code. I want to be able to send these reports to other people via emai. I don't care how its done, but it seems that if I could get the report into Word 2007 the problem would be solved. What are your suggestions to accomplish my objective.Terry 01
View 1 Replies
Mar 30, 2010
i would like to create a new line in my Message Box, i would like it to appear like this...New Read Number must be greater than Zero OR Make sure ther's a data in both input boxes [code]
View 2 Replies
Aug 29, 2009
I need to display a line chart which i retrieve data from the database in Visual Basic 2005.How to create a line chart in Visual Basic 2005? is it possible? if possible, can anyone teach me how to create.
View 4 Replies
May 21, 2010
I want to do this:
lblQuestion.Text = "Text (insert line break) More Text"
View 8 Replies
Jan 19, 2012
literal.Text = (gridView.Controls[i] as CheckBox).Checked ? "True" : "False";
How to convert this line to VB.Net syntax,
View 4 Replies
Apr 20, 2009
I'm looking for the C# equivalent of the line below.
If New FileInfo(c:images est.jpg).Length < 25 * 1024 Then
View 5 Replies
Mar 26, 2012
[code]...
i wanna make it so i disable or maybe comment out line of codes 4 5 6 in the code but also make them work again ...decomment them.set Site values in FTPWebRequest in
View 4 Replies
Jun 22, 2010
Me.pass = Conversions.ToString(CDbl((((Conversions.ToDouble((4 & 3)) - Conversions.ToDouble(4)) + (Conversions.ToDouble(2) * Conversions.ToDouble(1))) / Conversions.ToDouble(2))))
[code].....
View 1 Replies
Jan 16, 2010
we have Form1 and in this form we have several Subs like this:
Public Sub Sub1
Dim a,b,c as integer
a=1
b=1
[code]....
I want to put into str1 and str2 as strings the lines below specifying only the line number of the form where these particular instructions are found
Example:
str1="if a+b=c then msgbox("Correct")"
str2="if a2+c2=b2 then msgbox("Incorrect")"
Any function to do this?
View 19 Replies
Feb 3, 2012
I am converting a codeblock from C# to VB.NET using the All is going well except for one line which I cannot figure how to convert:C# source
result.DrawPolyline(Array.ConvertAll<PointF, Point>(pts, Point.Round), true, new Bgr(Color.Red), 5);
Using the converter gives this
[code].....
View 2 Replies
Apr 20, 2011
Does anybody know how to ignore a line(s) of code after a line(s) has executed. Let say you have a button1, and two CheckBoxes. By clicking once button1, cheheckbox1 checked. By clicking agin button1, then CheckBox2 checked. You will probably say that I can do that in diferent way, but it isn't the solution of this problem that I want. This is only an example.
View 11 Replies
Mar 2, 2012
How would I write the 3rd VB code in C#?. I can't find anything on Google.
Imports XL = Microsoft.Office.Interop.Excel
Public Class LicenseRenewal
' The line below to C#
Private xlRangesForRenewal As New List(Of XL.Range)
View 5 Replies
Nov 22, 2011
This link offers sample code to infer the schema of an XML file, in VB.NET. One particular line fails in my translation to C#, namely,
Dim schema As XmlSchema = schemaSet.Schemas()(0)
My translation is
XmlSchema schema = schemaSet.Schemas()[0];
[code].....
View 1 Replies
Dec 5, 2010
I am trying to make a long line of code apear on more then one line.How do I make this:
Do Until Counter1 >= Wash1
Into this:
Do Until Counter1
[code].....
View 2 Replies