|
Just because a language is no longer supported by its maker does not mean it is dead. A language is "dead" when no one uses it anymore. There are plenty of legacy applications written in Visual Basic 6 that I'm sure will need to be updated in the years to come.
Private Sub A (ByVal Param As String)
' Do something with Param
End Sub
To pass it, call A("string") .
|
|
|
|
|
Hi
Private Sub Month_Click()
Worksheets(SetMonth).Range("M1").Select
Count6 = 0
Do
Count6 = Count6 + 1
ActiveCell.Value = "0"
ActiveCell.Offset(1, 0).Activate
Loop Until Count6 = Count5
need to pass Count6 to Procedure1
Sub Procedure1()
SetMonth = "August"
Count7 = 0
Do
Worksheets(SetMonth).Range("M1").Select
Bill1 = Application.InputBox("Enter July Amount?")
ActiveCell.Value = Bill1
ActiveCell.Offset(1, 0).Activate
Count7 = Count7 + 1
Loop Until Count7 = Count6
Worksheets(SetMonth).Range("A:K").Select
Worksheets(SetMonth).Columns("A:K").AutoFit
End Sub
Does this mean then that I change the following or am I misunderstanding, its been a while since I wrote visual basic script:
Private Sub Month_Click(ByVal Count6 As String)
and
Sub Procedure1(Count6 As String)
|
|
|
|
|
No, I wrote that as VB.Net. For VBScript make it Sub Procedure1(variablename) . Look for the Passing Variables into a Subroutine section on VBScript in a Nutshell[^].
|
|
|
|
|
i am not understand your ans. so pls. describe it
|
|
|
|
|
Can i trap crystal report pop up msg in vb 6.0
|
|
|
|
|
|
i used google but i can't find ans proper
& here i used crystal report this sof connect with any technology vb 6.0, vb.net ..... so give me ans in with any tech if u know in vb.net then give ans.
Thanx
|
|
|
|
|
From what I know you can only use Crystal Reports 11.5 with .Net.
Here at work we use 7-8.5 in VB6 with no problems, but I'm not sure what you mean by "trap the message box".
|
|
|
|
|
when i run project (vb 6.0) & open at a time more then 5 report (Crystal report 8.5) then it will give me error
Run-time error '-2147189547'(80047cd5)
there are not enough concurrent access licenses to log you on. This system has 5 concurrent access license. Please try again later, or contact your system administrator to obtain more licenses. Licenses can be purchased direct from Seagate Software or through the Segate Software Online Store.
Which pop up in crystal report but i wan't to trap this error in vb 6.0 here i put on error goto command but due to the error is pop up in cr so it is not worked so give proper solution for that.
Thanx
|
|
|
|
|
have you tried a "try... catch" block to grab the error and do something with it?
Like:
Try
rpt.Load(rptfile)
CrViewer.ReportSource = rpt
Catch ex as Exception
MsgBox(ex.Message.ToString)
Finally
rpt.Close
End Try
If that wont work.. then it might be the CR 8.5 will only let you have 5 reports open on your computer... no matter what. In that case you'll have to buy more licenses.
|
|
|
|
|
hi
see he traps the Errors in this article, its not different
http://www.codeproject.com/KB/vb/JatsArticle1.aspx[^]
Hoep it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Stop Posting One Question many times
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hello,
I'm creating a parser for some logs derived from ssh. I used an array to split the logs for every "next line" I encounter then I have to go through all those lines again (one by one) to check for certain keywords. My problem is after going through the 1st index, the 2nd index acquires a "next line" at the beginning meaning my search can't function accurately. My question is how do I remove that line at the beginning of my 2nd index? I've tried TRIM and REPLACE but none of it doesn't seem to work. Many thanks for any help you could give me.
Oh by the way I'm prehistoric...this is done in vb6
Here's my code:
a = txtSam.Text
strarray = Split(a, Chr(13))
For b = 0 To 3
strarray(b) = Replace(strarray(b), Chr(13), "")
strarray(b) = Trim(strarray(b))
If Mid(strarray(b), 21, 4) = "[15]" Then
pos1 = InStr(1, strarray(b), "<")
strurl = Mid(strarray(b), pos1)
strurl = Replace(strurl, "<", "")
strurl = Replace(strurl, ">", "")
strurl = Trim(strurl)
ElseIf Mid(strarray(b), 21, 4) = "Sent" Then
pos1 = InStr(1, strarray(b), "[msg")
pos2 = InStr(1, strarray(b), "[udh")
str1 = Mid(a, pos1, pos2 - pos1)
str1 = Replace(str1, "[msg:", "")
str1 = Trim(str1)
str1 = Mid(str1, InStr(1, str1, ":") + 1)
str1 = StrReverse(str1)
str1 = Mid(str1, 2)
str1 = StrReverse(str1)
End If
Next b
Aim small, miss small
|
|
|
|
|
You probably also need to remove the newline character. So, after removing the carriage return character, do a replace to remove the newline character. Those two lines of code will look like...
strarray(b) = Replace(strarray(b), Chr(13), "")
strarray(b) = Replace(strarray(b), Chr(10), "")
Hopefully that will do the trick for you...
|
|
|
|
|
This forum never ceases to amaze me. Works perfectly. Many thanks for the help friend!
Aim small, miss small
|
|
|
|
|
Hai,
Can you help me to add the button column in the datagrid using vb.net2003.
This button i want for the purpose of (When i select one row and if we press enter)i have to close that grid,and goto other Form)..
Thanks,
Hanuman.G
hanuman
|
|
|
|
|
Hello,
I'm not totally familiar with vb.net but I think there's an option in the properties box. Try the layout tab. Then just code the opening of the other form like
Private Sub dgdDataGrid_ButtonClick(ByVal ColIndex As Integer)
Form1.Show vbModal
End Sub
Hope this helps
Aim small, miss small
|
|
|
|
|
For Adding a button to a datagridview first you add a button column to the columns collection.For example I created a buttoncolumn with name "Button".In the column properties i give the text of that column as "Button" and change the property "Use column text For Button Value" as true.
In the DataGridView1_CellClick event write the code below
Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
If DataGridView1.Item(e.ColumnIndex, e.RowIndex).Value Is "Button" Then
MsgBox(DataGridView1.Item(1, e.RowIndex).Value)
Me.Visible = False
Dim obj As New Form2
obj.Show()
obj.TextBox1.Text = DataGridView1.Item(1, e.RowIndex).Value
End If
End Sub
DataGridView1.Item(1, e.RowIndex).Value gives that rows 1st column value.You can use any column of that rows value for the unique identification of that row.Here I passed that value to a TextBox in Form2.
In Form2 with respect to that value you can display the needed informations.
Hope this information clear your doubt.
|
|
|
|
|
Hi All,
I m creating an Application KEYLOGGER. So i want to know that in which application the key has been pressed.
How do I detect which Application get focus at run-time?
Thanks
|
|
|
|
|
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hai, i am using VB 6.0. I want to read data from Excel sheet.
While txtStream1.AtEndOfStream <> True
main_str = txtStream1.ReadLine
.............................
Wend
I tried the above method. That does not help me..Pls help...
Balasubramanian K.
|
|
|
|
|
|
|
hi,
iam unable to color the cells of table i did coding like this but not able to get result any one please suggest me where iam doing mistake .
Dim tbl As Table = New Table()
Dim tr As TableRow = New TableRow()
Dim tc As TableCell = New TableCell()
tc.ColumnSpan = 4
tc.RowSpan = 1
tc.Text = "8AM"
tr.Cells.Add(tc)
Table1.Rows.Add(tr)
Dim tc1 As TableCell = New TableCell
tc1.ColumnSpan = 4
tc1.RowSpan = 1
tc1.Text = "9AM"
tr.Cells.Add(tc1)
Table1.Rows.Add(tr)
Dim tc2 As TableCell = New TableCell
tc2.ColumnSpan = 4
tc2.RowSpan = 1
tc2.Text = "10AM"
tr.Cells.Add(tc2)
Table1.Rows.Add(tr)
Dim tc3 As TableCell = New TableCell
tc3.ColumnSpan = 4
tc3.RowSpan = 1
tc3.Text = "11AM"
tr.Cells.Add(tc3)
Table1.Rows.Add(tr)
Dim tc4 As TableCell = New TableCell
tc4.ColumnSpan = 4
tc4.RowSpan = 1
tc4.Text = "12PM"
tr.Cells.Add(tc4)
Table1.Rows.Add(tr)
Dim tc5 As TableCell = New TableCell
tc5.ColumnSpan = 4
' tc5.RowSpan = 1
tc5.Text = "1PM"
tr.Cells.Add(tc5)
Table1.Rows.Add(tr)
Dim tc6 As TableCell = New TableCell
tc6.ColumnSpan = 4
tc6.RowSpan = 1
tc6.Text = "2PM"
tr.Cells.Add(tc6)
Table1.Rows.Add(tr)
Dim tc7 As TableCell = New TableCell
tc7.ColumnSpan = 4
tc7.RowSpan = 1
tc7.Text = "3PM"
tr.Cells.Add(tc7)
Table1.Rows.Add(tr)
here row is not created problem
Dim tr2 As TableRow = New TableRow
Dim trcell As TableCell = New TableCell
Dim i As Integer
Dim MyArray() As Integer = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
For i = 0 To 31
If MyArray(i) = 1 Then
trcell.BackColor = Drawing.Color.Green
Else
trcell.BackColor = Drawing.Color.Yellow
End If
tr2.Cells.Add(trcell)
Next
Table1.Rows.Add(tr2)
In above code second row is not displaying please suggest me where iam wrong .
Regards
Rameez
modified on Tuesday, July 29, 2008 1:52 AM
|
|
|
|
|