|
What is
<br />
<blockquote class="FQ"><div class="FQA">veon cheng wrote:</div>tbxRow.Text</blockquote><br />
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
|
|
|
|
|
hi
tbxRow is the id of the textbox, i name it as tbxRow
thanks
veon
|
|
|
|
|
try to use
Val in the place of CInt
hope it helps....
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi
thanks for replying, but its the same error
thanks
veon
|
|
|
|
|
Are you sure your variable has any value?
|
|
|
|
|
hi
thanks =)) its solved. as i run the code in macro it does not work but when i change it to a button it works =)) thanks for all the helps guys.
anw can i have some comments, my boss wants me to programe a excel programe to help them generate report. do you think i should do in spreadsheet or forms. which one would be presentable and more interactive??
thanks
veon
|
|
|
|
|
I have to do Excel VBA a lot.
I tend to use the Forms, sometimes just have a macro to call it.
(eg, Ctrl Q to call the form).
I find them easier and more adaptable.
Obviously for simple things like a column transfer or a set of create and save Sheets etc a Macro is easier, especially as you can use the recorder.
It really is a matter of choice, but I think the Forms a) look more professional, and b) imply you have done more work(even if you haven't), so it is better for workplace kudos.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
hi
ok so form will be more ideal, but what will be the possible challeng that i will face. besides that is form able to read data from excel, as in use the spreadsheet as the data.
thanks
veon
|
|
|
|
|
Are you asking if the form can use data from the spreadsheet, manipulate it and then move it back to the same or different spreadsheet?
If so, then yes.
Something like ...
<br />
Dim Something as Int<br />
With ActiveWorkbook<br />
Sheets("Name of worksheet").Select<br />
Range ("A1").Select<br />
Something = Selection.Value<br />
Range ("B1").Select<br />
Selection.Value = Something<br />
<br />
Of course you can choose different sheets and manipulate the data or other things as required, this was just a simple example.
------------------------------------
"When Belly Full, Chin Hit Chest"
Confucius 502BC
|
|
|
|
|
hi
ok thanks a lot realy thanks for the help and this is what i want thanks
thanks
veon
|
|
|
|
|
Hello Experts!!
I am developing crystal reports in vb.net and used MS Access as database having password security, when i want to view reports in project it asked for password of database.
Now i want to avoid that step, so what kind of coding required to pass username and password to crystal report?
|
|
|
|
|
Hi Guys, is there a simple code that I can use. I have a database and I collect information using a query and I want to see all the columns that are in the query when I use a combo box drop down. I am a newbie to visual basic
|
|
|
|
|
You would use a datagridView...
Create a DataTable to hold the query results:
Dim dt As DataTable = New DataTable("MyTable")
Get the data from the database:
Dim conn as New SqlConnection(connString)
Dim sql as String = "SELECT * FROM SomeTable"
Try
conn.Open()
Dim cmd As New SqlCommand(sql,conn)
Dim da As New SqlDataAdapter(cmd)
da.Fill(dt)
conn.Close()
cmd.Dispose()
Catch ex As Exception
End Try
Assign the DataTable to the DataGridView Control's DataSource property:;
DataGridView1.DataSource = dt
...or something like that.
<edit -="" changed="" datagrid="" to="" datagridview="" cmd="" dt="" in="" sqldataadapter="" initialiser="" too="" many="" vb6="" questions="" around="" here...="">
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
Driven to the arms of Heineken by the wife
modified on Monday, July 20, 2009 2:48 AM
|
|
|
|
|
hi to all,
i would like to know whether VBA is able to perform try and catch, if there is. how am i suppose to code it
thanks
veon
|
|
|
|
|
there is no try catch like .NET but u can use OnError goto
let's see with an example
Private Sub Command1_Click()
On Error GoTo ErrorHandler
Error 424 'This error is displayed when there is a missing object
Exit Sub
ErrorHandler:
MsgBox "Error Number: " & Err.Number & " With The Description ->> " & Err.Description & " <<- Occured."
End Sub
this is how you can handle exceptions, errors in VB6
hope it helps...
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi
thanks for your help but now i have a problem, i paste the your code into my code , when there is no error the error msgbox will prompt the user.
this is how i code it
Private Sub CommandButton3_Click()
On Error GoTo ErrorHandler
Error 424 'This error is displayed when there is a missing object
Exit Sub
Dim Wk As Worksheet
Set Wk = Sheets.Add
ss = tbx_name.Text
Application.DisplayAlerts = False
Wk.Name = ss
ErrorHandler: MsgBox "Error Number: " & Err.Number & " With The Description ->> " & Err.Description & " <<- Occured."
End Sub
so whats wrong with it thanks
thanks
veon
|
|
|
|
|
Try following code
Private Sub CommandButton3_Click()
On Error GoTo ErrorHandlerError
Dim Wk As Worksheet
Set Wk = Sheets.Add
ss = tbx_name.Text
Application.DisplayAlerts = False
Wk.Name = ss
ErrorHandler:
MsgBox "Error Number: " & Err.Number & " With The Description ->> " & Err.Description & " <<- Occured."
End Sub
hope it helps....
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hello,
for flight simulation I used the freeware PPJoy, with which I could connect my radio to the gameport and install it as a joystick. A very smart solution with no additional hardware needed except the cable.
Unfortunately my new computer doesn't have a gameport anymore nor a parallel port (all is USB). So I wonder if anyone would have an idea what I would have to do in order to connect the radio again? Maybe there are even coding solutions around, but I neither have an idea about the different signals nor which keywords to look for. Standing pretty much in the dark, all the messages I found by now sound like 'you need to buy more hardware'... but somehow I think that if I could connect to the gameport via software only, why shouldn't that be possible with the USB port?
Could someone please introduce me a bit?
Thank you
Michael
|
|
|
|
|
How on earth does a radio work as a joystick ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I'm glad that I'm not alone
Maybe the word is misleading: Radio means an RC controller, which - in some cases - can be connected to the PC via cable. The port e.g. detects (still: how?) the signals of X-Y-Z and throttle.
|
|
|
|
|
If the controller has a USB connection available, then you shouldn't have a problem. But, if all it has is a joystick connection, you simplay have no choice but to buy the extra hardware to get it connected to the PC.
|
|
|
|
|
hi i'm try send an email message
using System.Net Name space
<br />
Dim MailMSG As New MailMessage<br />
Dim SMTPSetting As New SmtpClient<br />
<br />
'===========================<br />
Dim _To As String = "To Address"<br />
Dim _From As String = "moeErrorNotifier@Gmail.com"<br />
Dim _GmailPass As String = "Password"<br />
Dim _moeHost As String = "HostURL"<br />
Dim _GmailHost As String = "smtp.gmail.com"<br />
'============================<br />
<br />
With MailMSG<br />
.To.Add(_To)<br />
.From = New MailAddress(_From)<br />
.Body = "Test Body"<br />
.IsBodyHtml = True<br />
.Subject = "Test Subject"<br />
End With <br />
With SMTPSetting<br />
.Host = _GmailHost<br />
.Credentials = New System.Net.NetworkCredential(_From, _GmailPass)<br />
.Port = 587<br />
.EnableSsl = True<br />
<br />
End With<br />
Try<br />
SMTPSetting.Send(MailMSG)<br />
Catch ex As Exception<br />
Throw ex<br />
End Try<br />
i'm working within domain
and this is the error:
Unable to read from the transport connection: net_io_Closed
modified on Sunday, July 19, 2009 8:59 AM
|
|
|
|
|
this is how you should Do it
MailMessage mm = new MailMessage();
SmtpClient smtp = new SmtpClient();
mm.From = new MailAddress("cc@gmail.com");
mm.To.Add(new MailAddress("cc@its.co.za"));
mm.To.Add(new MailAddress("cc@gmail.com"));
mm.Subject = "Hello";
mm.Body = "<p>This is the E-mail Test for !Booking System</p>";
mm.IsBodyHtml = true;
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();
NetworkCred.UserName = "cc@gmail.com";
NetworkCred.Password = "oops i cant give you";
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
dont forget
using System.Net.Mail;
in the Using.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified 30-Oct-11 2:13am.
|
|
|
|
|
Thanx for replay
but i think u just convert the code from vb.net to c#
|
|
|
|
|
the Example works Perfectly. give me your e-mail and send you a test mail.
use the http://converter.telerik.com/[^]
to convert to vb
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|