|
Yeah. I tried it once, but never could get it to work reliably. I was just messing around with it though. I didn't need it for any particular project and just dropped it at that point.
RageInTheMachine9532
|
|
|
|
|
Did u ever try any of the tools that supposedly convert a VB code into Java code... ? Do they work? Any good ones ?
Going to all this trouble because rewriting would be painful, even though logic is done. Have to implement Digkstra's and visibilty graph algos...
Sairam Samavedam
|
|
|
|
|
Of the few language conversion tools I've used, they ALL have one thing in common:
They can never get all the code to convert properly, so you have to go thru and edit the resulting code anyway.
RageInTheMachine9532
|
|
|
|
|
I am writing a VB.NET applicatio that dumps data to an Excel Spreadsheet. After the dump is completed, I want to prompt the user to save the spreadsheet by showing the SaveFileAs dialog Box. The statement:
Result = EXL.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show Argl:= fName
Where fName is the file name, doesn't work form VB. The Argl:= fiName part of the statement generates asyntax error - "End of statement expected".
How can I make this work in VB.Net?
Thanks!
Nelson
|
|
|
|
|
I am writing a VB.NET application that dumps data to Excel. After the dump, I want to prompt the user to save the file by showing the SaveFileAs Dialog Box. I am having trouble setting the default file name in the Dialog Box with the statement:
Result = EXL.Dialogs(Excel.XlBuiltInDialog.xlDialogSaveAs).Show Argl:= fName
VB.NEt indicates a syntax error (End of statement expected)
The equivalent statement works in Excel, what am I doing wrong?
Thanks!
Nelson
|
|
|
|
|
The syntax "Argl:= fName" shouldn't work in VB.NET. I believe that you simply pass the file name to the show method. Also, several people have written introductions to using Excel and Word in VB.NET and C#, you might try those if you have other problems.
|
|
|
|
|
Hi guys (again!)
Some of you may have been folowing my escapades with the Excel Object model, and many thanks to those that have offered assistance!
So today's problem is as follows....
Have a column containing dates (Action dates). Each value in the column can be in either one of three states based on the values in two other date cols( Start date and End date). The values can either be accepted - i.e. between the two other dates, and therefore green, Not accepted, i.e. outside the dates and therefore Red, or Default - a value read from a SProc in an SQLServer db, and hence Blue.
Now using conditional formatting, can use xlCellValue type, and compare based on the two cols for Accepted / Not accepted, and this seems to be OK, however, I cannot seem to make it work for the default values. I'm using the following code:
<br />
strCondString = "=$I$" & CStr(lPos) & "=" & dtDefault<br />
<br />
With oWS.Cells(lPos, "I").FormatConditions.Add _<br />
(Type:=xlExpression, Formula1:=strCondString)<br />
<br />
With .Font<br />
.Color = RGB(0, 0, 255)<br />
.Bold = True<br />
End With<br />
<br />
End With<br />
where lPos is a row reference, and dtDefault is the date. strCondString will evaluate to something like "=$I$2=12/01/2004"
The code seems to get through the compiler, in that it doesn't throw any errors when steppping over, but also doesn't colour the text at all - it stays black.....anyone?
To add confusion (and not looked at this bit yet), how will it all stack up when I throw in the colouring for Accepted - all default dates will be "accepted", so is there any precedence in the FormatConditions that anyone knows about?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Instead of relying on Excel's FormatConditions to perform conditional formatting, couldn't you rely on conditional logic instead, like so?:
Public Sub HighlightColor()
Dim i As Integer
For i = 1 To Range("MyRange").Rows.Count
If Not (Cells(i, 8).Value <= Cells(i, 9).Value And Cells(i, 9).Value <= Cells(i, 10).Value) Then
Cells(i, 9).Font.ColorIndex = 3 ' Red
End If
Next
End Sub
Or should the condition be in place for when someone interacts with the worksheet?
|
|
|
|
|
John Kuhn wrote:
Or should the condition be in place for when someone interacts with the worksheet?
Unfortunately, you've hit the nail on the head! Am developing a utility to generate the spreadsheets based on different date ranges, which will then be used by others to enter data - hence the need to have all the formatting stuff in place before the user gets the sheets - it's not just a VBA project, but a full VB6 executable.
Have managed to get around it though, by putting the default dates into a hidden column, and then using xlCellValue rather than xlExpression.
Many thanks for the help though - hope I can return the favour some day!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
You should have come to me, I could have got you the answer wholesale...
Steve S
|
|
|
|
|
I have filled Combobox value by setting DataSource property, giving Display Member and Value Member, for a particular Table fields in Access-2000 database. I selectd some value of combobox. now when i load that form again, i want to set the previously selected value of combobox. have tried using combobox1selectedvalue = code, also tried out by setting combobox1.text, combobox1.selectedtext, but none of them is working.
Its very important will be thankful and grateful if anyone can pull me out of this problem.
Thanx
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
How about combo1.listindex = lSomeVal . Would that fit the bill
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
No its not working pal
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
I use the code below to do what (I think) you need to do...
<br />
'Now set the combo to show the propDB stored in the .ini file<br />
For i = 0 To cmbPropDB.ListCount<br />
If cmbPropDB.List(i) = gstrPropDB Then<br />
cmbPropDB.ListIndex = i<br />
Exit For<br />
End If<br />
Next i<br />
The thing that might be causing it to work on my machine and not on yours is because I've set my combo box type to DropDownList - this means that the user can't type directly into the edit area, but must select from the list.
Let me know a bit more info, and will see if can sort it out for you if you like...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello everybody,
How can I implement navigation methods such as MovePrevious on collection objects in Visual Basic 6.0?
Also, is there a fast way to search a collection object on some attributes of classes it stores, other than keys or ids?
Regards,
Roozbeh.
|
|
|
|
|
Here are the options I know of:
1) You can write your own custom class that "inherits" the VB6 collection object. Of course VB6 doesn't really inherit, you simply wrap calls to the collection object with methods of your own class (is that a wrapper or a decorator...)
2) You can write a method of that class that searches through the collection for a particular value.
3) You can look around for a custom control or library written by someone else.
|
|
|
|
|
How can I access shared folders on a remote machine using vb.net??
|
|
|
|
|
How are you establishing the connection to the remote machine, using what connectivity? FTP? HTTP? NTLM?
|
|
|
|
|
Its not thru HTTP or FTP.I dnt know what the other 1 you mentioned is.Actually in a LAN which uses TCP i need 2 get the shared folders on remote machines when logged in as an administrator using vb.net.
|
|
|
|
|
If everything is in the same workgroup or domain (and the Administrator account presumably has permission to everything in the workgroup or domain) then you may simply refer to the location using the UNC path -- i.e., "\\machinename\sharename\foldername\", and you will not have to expend any additional effort with coding for file access & security permissions.
|
|
|
|
|
hello everyone,
I have a simple single-window program for mathematical graphing. I have seen an example somewhere of how DirectDraw is being used to accelerate drawing of MDI windows. Though I don't use a MDI app, but however, use very heavy graphing and filling I though DirectDraw could help me. I'm new to this so I was just wondering if anyone has any ideas on how to implement this?
any help would be greatly appreciated. thanx.
|
|
|
|
|
guyss/girlss this is bothering me..there are no .net gurus that i know....and i need some help...i made this prog and i want a sound to play when a label(timer) reached 10 sec...but i have multi timers..soo there for at some times there will be multi wav files being played...Soo heres the prob...When it reaches 10 sec it plays the file..but its takes like a Sec to load the file..which throws off the clocks..does anyone know how i can stop this from happening..and how to make everything run smooth??
Thankss Nickkk
|
|
|
|
|
Try using directsound, you will need the directx SDK.
|
|
|
|
|
Hi guys,
I have one user control implemented in .net (c#) and im trying to call it from a form in visual basic. the big problem is i cant add that control to vb designer, i just can add it as reference, so when the vb form comes up i cant see my control. i've done all the steps in this link (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp).
does anybody any hint, thanx in advance.
|
|
|
|
|
First thing that comes to mind is did you add the control via code?
controls.add(classname) ?
|
|
|
|