|
Hai
I want to a lanch a excel file using vb6.0. The excel file is a online updatable file and contains more macros for online updation...
so i need to launch the excel file so that it automatically enable the macro and automatic update..
Plz anyone can assist me
Thank u
|
|
|
|
|
If you're talking about launching the Excel file (*.xls) without any further automation, then you can just use the Shell command to launch it.
h = Shell("C:\fully\qualified\pathToFile.xls")
|
|
|
|
|
hi all,
i am really stuck at how one would write textbox does not equal array.
here is the code, i even tried <> but is does not work.
please help me.
If txtModID.Text "does not equal" (arrPlayer(intctr).intPlayerID) Then
thankyou in advance.
your help is much appreciated
Unicept
|
|
|
|
|
You could use ToString to compare them as strings, or you could use int.TryParse to see if the text is an int, then compare those. You can't compare two objects of different types unless an implicit conversion exists.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
if u want to comp[are objects like strings, or any of ur own objects then use
"NOT obj1.equals(obj2)" this will return a boolean result, and ifr u want to compare any # then use
num1 <> num1 ill return false if both # r true.. hope it will help
(Jameel)
|
|
|
|
|
If you are using vb.net you can simply loop through your array with the string.compare method:
For each StringElement in YourArrayOfStrings()<br />
If txtModID.Text.Compare(String) > 0 then<br />
'do something<br />
End If<br />
Next
Hope this helps,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
How to get detail dscription of error numbers in VB6
Thank in advance
|
|
|
|
|
Err.Description is all the description you're going to get.
|
|
|
|
|
Can any one tell me what is the use of delegate in .NET
Thanks in advance
Ahamed Azeem
|
|
|
|
|
It is used to call a method in another class, such as an event, or to notify one class of something that happens in another.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks a lot.
Could u please explain little bit detail?
Ahamed Azeem
|
|
|
|
|
If you want more detail, try googling for some articles on it. They will provide more and better detail than I will on the fly
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear All,
I am using VB.NET 2003 and MS Access 2003 and my project is always used the database.
Pls check this code,
Public Sub DR()
..........
............
Dim drd1 As System.Data.OleDb.OleDbDataReader
SelectedDataReader(drd1)
Do While drd1.Read
Dim a As Integer
price(a) = drd1.GetDouble(0)
a = a + 1
Loop
drd1.Close()
...............
..........
............
End Sub
Data reader is in another module.
Module CUFA
............
...............
Public Sub SelectedDataReader(ByRef drd1)
Dim cmd1 As New System.Data.OleDb.OleDbCommand
cmd1.Connection = cnn1
cmd1.CommandText = "SELECT Price FROM Selected"
Try
drd1 = cmd1.ExecuteReader
Catch ex As SystemException
End Try
cmd1.Dispose()
End Sub
...........
...........
End Module
Pls let me know is this correct?
And data connection is opened another module. It opens starting of my project and closes end of my project. During that time more than 200 data readers and commands open and close.
Dimuthu
Dimuthu
|
|
|
|
|
To do what??
As far as your code goes, it's a lousy design. That's about all I can say about this....
dimuthuvbnet wrote: And data connection is opened another module.
Why?? Why not just have a method in your DAL that creates a DataReader for your command and returns it?? Why are you creating a DataReader in one place, creating a command for it in another, using a "global" variable for a connection, chosing bad names for your methods, using two different classes/modules to build this reader, ..., need I continue??
You're really missing the point of encapsulation. This code can be done in a single class, using at a minimum, 2 methods, and a max of 4. One method to retrieve the connection string from a config file, a second to create a connection object (it's also acceptable to combine these first two into one method), and a third to create the data reader. You may either return the data reader, or create another method to use the datareader to create your array, though there are other methods of doing what your code looks like it's doing.
|
|
|
|
|
Hi,
I am using VB.NET 1.1 on a Windows application. It is an import program. There is a start and stop time, during these 2 times the back is run so the import program should pause. How do I check if every second if the current time is out of the time range so that I can resume the import program after the stop time.
So if I type in 19:00 for the start time and 02:00 time then the program pauses, so I will need to know when it is 1 second past 02:00 so that the import can continue.
Regards
.NET Enthusiast
|
|
|
|
|
Just use DateTime.Now in a timer. It doesn't have to be 1 second past, just check if it's past.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
How can I Access a text field of word document using VB.
Please Help..................
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
I am using .GIF file in my appliation but its not animating.
How I can animate the file in vb.net 2003? Is there is any property or code needs to be added to animate the file.
Thanks In advance
Ejaz
|
|
|
|
|
There are articles about on how to do this, but it's not built in, you have to write or find code to do it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
No need any codes
u just have to put a picture box and put ur pictures inside tht picture box , thtz all
yathu
|
|
|
|
|
I have only one picture and I added in the picture box at run time but its not animating.
Ejaz
|
|
|
|
|
did u add tht in the image property of ur picture box?
if u add it to background property of picture box , i thing it wont work ,
click on image property and browse ur picture n giv it
it shud work
, or else some problem with ur .gif animation file
coz this is the way
, i hav done a lot
good luck
yathu
|
|
|
|
|
Thanks jathoo for ur reply.
I am adding the image at run time.The code I am using to add link the image to the picture box is
Me.PicStrikeRate.Image = Me.ImageList2.Images(0)
At run time it is not working but If I added the same picture at design time it works.
Any idea how to fix this?
Ejaz
|
|
|
|
|
first of all why you going for code?(you can simply do it on GUI mode, i told u on up)
Me.PicStrikeRate.Image = Me.ImageList2.Images(0)
on this code you are puting ur image to imagelist but , as i know .gif file will only work on picturebox( i don know it may work on imagelist or not and i thing i wont work, didnt try it yet)
so. if u want u have to directly adding the image to picturebox using code
yathu
|
|
|
|
|
Hi man...to make a .gif image animation..just load it in the image option of a PictureBox and no in the Background image of it.. *you cant resize the animation
I hope I understand and solve your problem.
Kostas
|
|
|
|