Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Greater Than Less Than Statements


Hi,

How can I get VB6 to do the following;

My program runs on PC 1, programs version no is 2.23. My updated version sits on a network drive, H: version 4.50.

I want to compare the 2 file versions and get VB to tell me if the program version is =, >, or <.

In VB6 code I can put the following. I don't want to specify the >, < or =. I want VB to pick this value up automatically.

if txtProgVerPC.text > txtProgVerNet.text then whatever

but I've done the following and VB seems to ignore the value

txtProgVerPC.text = "c:myprog.exe"
txtProgVerNet.text = "h:myprog.exe"
txtCompvalue.text = 'this can be ">", "<", ">=", "<=", "="

txtCompare.text = txtProgVerPC.text + " " + txtComp.text + " " + txtProgVerNet.text + " "

If txtCompare.text then whatever
'The value will be somthing like 2.23 >= 4.50 then

This is not working, it always returns the value as being true even if something is less than or greater than.

Any help is appreciated.

Thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Greater And Less Than
Ok heres what im trying to do, Im trying to set an if statement that will take two variables one for speed (text1) and one for angle(text3) and depending on the speed and the angle trigger an event (making a box appear). However the if statement i am trying to use isnt working right. What I think i need to do is an if statement that is similar to the table below

Speed Angle Allowed
20-30 20
30-40 35
40-50 45
50+ 60

The problem I am having is it triggering at the wrong time. I cant think how to make sure it only triggers when text1 is greater than 20 and less than 30 to work right. Below is my code

If Text1.Text >= 20 And Abs(Text3.Text) >= 20 or Text1.Text >= 30 And Abs(Text3.Text) >= 35 Then

Greater Than Less Than
Whats the code for typying (less than 1 OR greater than 1)?

Greater Than Or Less Than
id call me self a faily decent programmer, but theres 1 thing that i still get muddled up with sometimes.

what is this > (either greater than or less than)
and this < (either greater then or less than)

i am sure sum1 will know the answer to this as it is a simple question and to be honest i am quite emabrrased about asking this as i know it but its just my dumb mind swapping things round and confusing itsself lol

thanx a lot

Need Help With Greater Than Or Less Than
Hi guys,

I'm new to visual basics and im taking a class.
I have an assignment due but i dont know how to do it.

I have a text box called txtScore which will be used to input scores.
And a label box called lblOutput to display the message.

•Assign variable with name score to content of textbox txtScore using the cdbl function. Make sure you declare score as a real number at the beginning of the program
•Display a message using the if-else-end if command:
If score is greater than 60, you display message: “Congrats, you’ve passed” in the labelbox
If score is less than 60, you display message: “sorry, you’ve failed” in the labelbox

I am not sure how to even start this or even how to use the greater than or less than function.

Thanks guys!

Greater Than Less Than
I'm trying to do the following


VB Code:
Select Case rstProducts!date_sold - rstProducts!date_recv          Case Is < 6                   num1 = num1+1          Case Is > 5 and  Is < 11                   num2 = num2 + 1End Select


The second case statement doesn't work. Does anyone know another way around this?

Need To Do A Greater Or Less Than
I am trying to take two text boxes with numbers in them and tell which on is greater and put the result in another text box. An example to give an idea what I am looking for. Now this doesn't work I tried it and laughed but you will get the idea

if text1.text ">" text2.text then 'if text1 is greater than text2 then
text3.text = "text1"
End if

not sure what I am missing, I have never done this before and have no idea. Hopefully someone will be able to help. Thanks in advance. Joe

Greater Value Of A Column
Hello:
In a MSFlexGrid as I can obtain the greater value of a column?
Tank

Finding Which Is Greater
how would i go about finding out which out of 2 textboxes (with numbers in them) is greater.

GReater Than And Less Than Function Help
I need help with making a program that tells users if their number is a two digit number or a three digit number.

Here is what I have got:

Code:

Private Sub cmdprocess_Click()
If txtinput > 99 < 999 Then
lbloutput = "This is a three digit number"
End If
If txtinput > 9 < 99 Then
lbloutput = "This is a two digit number"
End If
End Sub


After running the program I can enter any number and it says "This is a two digit number"

Greater Than (&gt;) Less Than (&lt;) Symbols
I am trying to use a formula that contain greater or less than. I am using the ">" and "<" symbols, are thses correct as it does not work.

If I use = and it is o.k.

Royxyz.

Greater Update, Less Then Don't
Hi

i am making a little application that monitors the amount of time that your system has been running for, this is easy, and when you close the program is appends all of this information to an .ini file in the following format


Code:
0 Days, 0 Hours, 0 Minutes, 9 Seconds


and at the bottom of the program it displays the longest time that your system was running for, and it gets this information from the .ini file and writes it to a label. as you can imagine all it keeps on doing is writing the current system status even if it is a lesser amount, so i need a way in which i can check this information and if the information is greater than the current time, then don't append the file, but if it is then do append the file, please help

here is the code to append the file


VB Code:
Private Sub Form_Unload(Cancel As Integer)'MsgBox ("This is where i will append the time information to a .ini file")Set fs = CreateObject("Scripting.FileSystemObject")Set a = fs.CreateTextFile("C:windowsdesktopinfo.ini", True)a.writeline lbldays.Caption + lblb.Caption + Label6.Caption + lblb.Caption + lblhours.Caption + lblb.Caption + Label5.Caption + lblb.Caption + lblmin.Caption + lblb.Caption + Label4.Caption + lblb.Caption + lblsec.Caption + lblb.Caption + Label3.Captiona.CloseEnd Sub


and here is the code to read the file


VB Code:
Private Sub Form_Load()Dim X As ObjectDim s As StringDim sz As StringSet X = CreateObject("Scripting.FileSystemObject")If X.FileExists("c:windowsdesktopinfo.ini") Then    Open "c:windowsdesktopinfo.ini" For Input As #1        While Not EOF(1)            Line Input #1, s            sz = sz + vbCrLf + s        Wend    Close #1    Form1.lbllong.Caption = szElse    'MsgBox "No file!"End IfEnd Sub


thankyou for all of your help regarding this matter

MDAC 2.5 Or Greater
where do i get it ? Is it free ? Help Me .

Greater&gt; Less Than Stuff
My program needs to charge $0.30 for 0-499 copies, $0.28 for 500-749 copies, $0.27 for 750-999 copies, $0.25 for 1000 or more copies
But it reads $0.28 for everything 500 and over. The &lt;&gt; thing confuse me can anyone help me out;(

Private Sub cmdcalculate_Click()
Dim intcopy As Integer
Dim curtotal As Currency
Dim curpercopy As Currency
intcopy = txtcopy.Text
If intcopy &lt;= 499 Then
intpercopy = 0.3
ElseIf intcopy &gt;= 500 &lt; 750 Then
intpercopy = 0.28
ElseIf intcopy &gt;= 750 &lt; 1000 Then
intpercopy = 0.27
ElseIf intcopy &gt;= 1000 Then
intpercopy = 0.25
End If
lblpercopy.Caption = intpercopy
lbltotalprice.Caption = intpercopy * intcopy
End Sub

Greater Or Less Than (Resolved)
Hello

I am not sure how to proceed from here.

In my project I have a label that gives me the total size of my folders

Code:Me.lblTotalFolderSize.Caption = "Total Folder Size: " & FormatNumber(TotalSize, 0) & " KiloBytes"

What I would like to do is "If the total folder size is greater than 150000 kilobites than msgbox and If the total folder size is less than 150000 kilobites than nothing.

Is this enough information??

Thanks
Bob



Edited by - Bob Taylor on 1/29/2006 12:57:36 PM

Less Than &amp; Greater Than Dates
Hi huys, hope you can help me out here before I tear my hair out completely.

I'm using the following code: (The comment itself will tell you what I'm trying to accomplish.

'// Obtain records where time is equal to, start date is less than or equal to today and end date is greater than or equal to today.

pub_objRSSendMail.Open "Select * FROM tbl_Times WHERE fld_Time = '" & MailTime & "' AND fld_StartDate <= " & Date & " AND fld_EndDate >= " & Date & "", pub_objConn, adOpenKeyset, adLockReadOnly, adCmdText

The fld_StartDate and fld_EndDate values are in an Access database and stored in Date/Time (Short Date) format.

Typical record:

fld_Time fld_StartDate fld_EndDate

00:48 31/07/2002 02/08/2002

I don't get any syntax errors in my above SQL statement but it just isn't collecting the records it should be. Invariably it collects 0 records or all of them, even though the dates fall out of the ranges requested. I'm confused. Can anyone point me in the right direction? I have a feeling I'm missing something really stupid!

Added: I've just tried this instead and still it returns no records!

pub_objRSSendMail.Open "Select * FROM tbl_Times WHERE fld_Time = '" & MailTime & "' AND " & Date & " >= fld_StartDate AND " & Date & " <= fld_EndDate", pub_objConn, adOpenKeyset, adLockReadOnly, adCmdText

PS. If it makes any difference, I'm in UK, hence the date format. dd/mm/yyyy

Many thanks in advance...





Edited by - MazY on 7/30/2002 6:58:00 PM

Greater And Less Then, How High Is The Resolution?
how high is vb's greater than or less then resolution... it looks like it only goes to the 2nd decimal point

Working With Numbers Greater Than 2,147,483,647
I did a little searching on google and the forums, but couldn't find anything that pointed me in the right direction. The numbers I'm working with would be in the hundreds of quintillions at the most, involve floating point numbers, and I'd be performing arithmatic with them. What method would be a nice mix of speed and ease to program?

Splitting File Greater Than 2 Gig
Help!!

I have a 2.5 gig file I wish to split into smaller chunks.
I have written a VB routine that splits the file up but upon hitting 2 gig it crashes

Does anyone have any ideas?

More Classes = Greater Exe Size?
Someone was just telling me that creating classes to do work inside of an application actually produces larger executables compared to simply putting the same number of lines of code in a module - True?

Why Are Pickles Greater Than Bananas
I have taught myself to code in VB .net over the past year so I may have missed this but I am confused...
there is a reason why I ask...not just because I am bored


Try this and tell me why pickles>bananas

Dim a As String = "pickles"
Dim b As String = "bananas"
If a > b Then Label1.Text = a

Cheers,
Jim

Greater Than 37 Formula Code?
I need to find the formula code for greater than 37... so that i can assign a msgbox saying Error Maximum hours worked is 37

Extracting Numbers Greater Than Zero
i have some set of numbers gotten from a card reader. the set of numbers contain zeroes and
some other digits.e.g "0000023203". and i want to extract all the digits that are greater than zero and send it to a
textbox. for example, after looping through the set of numbers 0000023203, i will then have
2323 that i will send to a textbox field.
please someone should assist as soon as possible.
thanks

Greater And Lower Question!!
Ok i really dont know what is wrong with me tonight. but this doesnt see to work. take a look at this


VB Code:
Private Function Search(iMin As Integer, iMax As Integer)            Do Until Adodc1.Recordset.EOF        If txtPrice.Text >= iMin & txtPrice.Text <= iMax Then            lstDisplay.AddItem txtHomeMLS.Text        End If        Adodc1.Recordset.MoveNext    Loop    If lstDisplay.ListCount = 0 Then        MsgBox "No records found"        Adodc1.Recordset.MoveFirst        Exit Function    End If    End Function


Ok now i have a few numbers is lookin at they are 198, 345, 230 now i put in so that the iMin = 10 and iMax = 10

but it displays all of them. Dam can somone plz tell me if i am doin something wrong, because i just blacked out and cant see any errors lol. Thx

Article: A Greater Understanding Of Bit-Set
This is a GREAT article!!!!
Its a article about bit-set operations in VB.
It talks a whole lot about the number system of the computer also.
The information is very usefull if you dont know it already.

How Can I Format Time Greater Than 24 Hrs
I need a inputbox,DTpicker or something for a user to enter a amount of time. I would like the user to be able to enter time in hh:mm but not be limited to 24 hours. I want the user to be able to enter 100 hours if necessary. Anyone know an easy way to do that?

Sign Logic Issues: Less Than, Greater Than
I'm working on some small gaming and encryption code. The big obstacle I keep running into using VB 4 Enterprise Ed is the problems with logic resolution with the "less than" or "greater than" signs. This is an issue I've encountered more than once. Is this a problem within the application or am I overlooking the obvious??

My biggest fear is to pull out the last of my hair over something that is completely outside of my control.

Checking For Greater Values - Simple
Hi there. I made a simple program which tries to check if the value entered in a box is greater than the ones stored in a file. For some reason, it is not working.

If we have these figures in a file:

2
3
4
5
6
9
8


and we enter 7 in the inputbox, it should say replace 7 with the lowest number/figure.



Code:
Dim k As Integer
Dim a As Integer
Dim x As Integer
Cls

Open App.Path & " est.txt" For Input As #1
Do While Not EOF(1)

Input #1, scorefile(k)
Print scorefile(k)
a = a + 1
Loop

Close #1



x = InputBox("Please enter a number!", "test!")

If x >= scorefile(k) Then
Print vbNullString
Print x & " Is greater than: ", scorefile(k)
End If

If x <= scorefile(k) Then
Print vbNullString
Print x & " Is less than: "; scorefile(k)
End If

This is a test for the flags program, I need the flags program to see if the current score is better than the one in the file, if so, replace it with the lowest score in the file.

this program just displays x is greater than 10, instead of the closest value.

any ideas?

Can it be done? how? Please help.

Querying Records 'greater Than' A Date?
Hi all.
I'm a relative newbie to all things VB and to SQL queries...

I'm trying to select all the records from a table that are greater than a date specified in format mm/dd/yy in a column labeled DateModified inside my Access DB (.mdb) file.

The date variable dteSelectedDate is of type date and gets it's value from a calender control. I'm able to get the value of the calendar control and get that into my SQL query, but when I try to select records greater than date, I get a run-time/ SQL syntax error. If I leave out the WHERE clause that grabs the records greater than the date, it works fine.

Here's a code snippet:

Code:
' If the dteSelectedDate variable is NOT empty (if the value is NOT 12:00:00 AM, the value of a date type variable w/o a value), then use strSQL with the WHERE clause and the dteSelectedDate variable

If dteSelectedDate <> "12:00:00 AM" Then
strSQL = "SELECT * FROM Topics WHERE ProjectName=""" & strProjectName & """ AND WHERE DateModified >= #" & dteSelectedDate & "# ORDER BY DocumentName, DateModified"
Else
' Otherwise use strSQL w/o the dteSelectedDate varible
strSQL = "SELECT * FROM Topics WHERE ProjectName=""" & strProjectName & """ ORDER BY DocumentName, DateModified"
End If

' Query the database, the Topics table, and return those records for the current project
' Assign it to the recordset
MsgBox strSQL ' Used for testing
Set myRecSet = myDB.Execute(strSQL)
Here's what a sample SQL query looks like that doesn't work:
SELECT * FROM Topics WHERE "PC-DMIS_3.6" AND WHERE DateModified >= #11/11/2003# ORDER BY DocumentName, DateModified

The code in the else portion of the IF Then Else runs fine. However, if the condition is true, it tries to put in the second WHERE clause that grabs the records greater than the specified date, and then I get a run-time/syntax error of a missing operator on that query.

What am I doing wrong? Thanks for any help you can offer.

DataReport Showing Greater Than 24 Hours
Using no DataEnvironment
VB6 and access.mdb

I have cut snippets out but you should get the idea.....

i send a qry asking :
select (`Total_mins`-(`Break_mins` + `Lunch_mins`))/1440 As RHours from...

With DataReport2.Sections("Section7").Controls
.Item("Function4").DataMember = "Command2"
.Item("Function4").DataField = "Rhours"
.Item("Function4").FunctionType = rptFuncSum
End With

In the datareport i have hardcoded a custom format for "Function4" = "Hh:Nn"

The max Hours given is 24.
Does anyone have any ideas to display times greater than 24 hours as a total?
Thank you in advance.

Printing The Form Greater Than The Screen
PEET
The code which u have send doent work for the form larger than the screen.

If the form is larger, the windows task bar also get printed. I want only the from window to be printed....

How do i print only the form.

Printing The Form Greater Than The Screen
Hi,

how do i print the form which is larger than the screen. I need the nonclient area such as titlebar, menus and borders also to be printed.

Is there a way to print this????

Delete Row If Date Is Greater Than Or Eqaul To 6/6/08?
I have a spreadsheet with about 225 sheets or so containing data. The date is in column J. I

am needing to delete all the Rows that have a date greater than or equal to

06/06/08.

There are a total of 8 workbooks that need this done, so as you can see, it would be almost impossible to do

it manually, so I was wondering if somebody could help me out with a macro/vba.

Any help would be GREATLY appreciated!!!
Thank you!

Performace Difference Between Like Comparison And Greater Than/Less Than
Hi,

I'm writing some code for work, the goal of which is to assign records from one table
(SOURCE) to the appropriate sales rep stored in another table (CSR). The association
occurs via postal code.

In the first iteration of the code, the CSR table contained postal code ranges (i.e.
Bob = 92XXX). However, the data that populates that table has changed, and now each
sales rep has a low and a high postal code as a range (i.e. Bob = 92000 (low) and 92999
(high)).

In the first instance, I was using the boolean Like function to determine if a record
from the SOURCE table should be associated to a particular sales rep (i.e. 92564 Like
92XXX). In the second instance, I employed comparison operators to do the same job
(i.e. 92564 &gt;= 92000 AND 92564 &lt;= 92999). What I have found is that using the comparison
operators causes the same code to take 3 times as long to run through the entire SOURCE
table. For example, if it took 20 seconds to run through 2000 rows in the first version,
it now takes 60 seconds to run through the same records.

Do the comparison operators just use up more memory than the Like function? Is there
anything I can do to reduce the time it takes to churn through the data?

Thanks,

-Mike

Time Difference With Values Greater Than 24hs
Hi guys, I'm new in this forum and new in VB. I'm looking for some help for my first application

I'm developing a Delay Calculator. First I insert the 2 different time to get the difference and this calculation is working with more than 24 hours without problems.

But..

I have to justify each delay ( max 4 types) 'til I reach 0...zero means all delay is justified. My problem is I splitted the values. I have 1 textbox for hours and another 1 for minutes and vb is reading it like normal numbers...different from hours. I tried everything with common math, but I always get type mismatch...please take a look





Private Sub Command2_Click()
mskdep.PromptInclude = False
mskactdep.PromptInclude = False
If mskdep.Text = Empty Or mskactdep.Text = Empty Then
MsgBox "Please Insert a Valid Time", vbExclamation, "Delay Calculator"
mskdep.PromptInclude = True
mskactdep.PromptInclude = True
mskdep.SetFocus
Else
txtres1 = txtopen1 - txtdl1
txtres11 = txtopen2 - txtdl11
End If
End Sub

To be quick!
Everything I want is...whenever I get a negative value in txtres11 I would like to have a value of + 60 increased in this textbox.

Form1 5 Tabs Or Greater. Also Print Files From
Form1, how do you make form 2 3 4 etc as a tab, like the properties of your desktop were you change the background.

Also, how do you print a html file located on the desired path? example: Print c:SamplePrintPage.html one or 2 lines of code would be nice for this.

Check For Numeric AND Not Greater Than 100 - Code Inside
Sorry...was just trying to give something back to the forums.

Problem Using Greater Than Or Equal With Floats And Ints
I have a function that I created to handle the >= operations for two different types of numeric values. I am comparing numbers in a Excel worksheet which are actually strings. (does that make sense? Like "2.0" as a string, not a float). So I figured out that when I am passing floats they will always we less than or equal to 1 since the floats in this case are always going to be percentages. The #'s = to 1 or greater I treat as ints and cast them with CInt() and then do >=. This has worked until I got my new set of data which has floats in this form: "4.777777-E2", where this is actually ".04777777". It trys to do a string compare and 4.77777-E2 is greater than any other percentage since in using the string compare it looks at the first digit and compares the first digit of both strings to see which is greater.

Here is the code... If I knew how to cast a string to a float (if it is possible in VB) then this problem would have been solved a while ago.

Maybe some of u know what i can do:

Function greaterThanOrEqual(ByVal Temp1 As String, ByVal temp2 As String) As Boolean
If ((Temp1 <= 1) Or (temp2 <= 1)) Then ' they are floats.. use > compares
If (Temp1 >= temp2) Then
greaterThanOrEqual = True
Else
greaterThanOrEqual = False
End If
Else
If (CInt(Temp1) >= CInt(temp2)) Then
greaterThanOrEqual = True
Else
greaterThanOrEqual = False
End If
End If



Thanx in advance,
cLocKwOrk

How Can I Adjust Combobox Height Greater Than Default (315)?
I cannot make the height of a combobox on my form greater than 315, is there a special reason for this? The reason why is because I am using a combobox in a grid to enter data and I need to adjust the height of my combobox to the height of the cell in the grid where the combobox is needed...Any help in this regard will be appreciated...


"The answer is out there, Neo, it’s looking for you. And it will find you, if you want it to."--Trinity to Neo

StreamReader And StreamWriter With ASCII Values Greater Than 127
Well, I can't seem to find solution to a problem, so I hoping for some help. I'm reading and writing a text file with StreamReader and StreamWriter that can possibly contain ASCII values greater than 127. I've tried all the different encoding options, as well as reading data into a character array instead of a string and still get the same results. The stream seems to automatically remove these characters upon reading them and then obviously doesn't write them out. I need to retain what was read and write it exactly as it was on input.

Any ideas?

Thanks

As A Value Range Changes A Resulting Num Changes Sequentially Or At A Greater Frequency
MY Question is how to build this the relationship in a formula fashion.

A Group of numbers will change on a linear path ex. 400-410, 410-420, 420-430 or backwards. As this movement occurs a second value will be changed up or down with each change of the 1st group and the second values frequency can be a single digit change ex: +1 or -1 or at an increased frequency ex: +5 or -5.

Currently I am using a case statement. I'd like to change this to a formula format.

As the groups change, "Case Is <=582...573" The zoom percentage changes by +1 or -1. the zoom percenteage should also have the ability to increase or decrease in greater frequency as well.

For a given number range the following number value is derived
Case Is <= 555
Myform2.AxFramerControl1.ActiveDocument.View.Zoom.Percentage = 58
Case Is <= 564
Myform2.AxFramerControl1.ActiveDocument.View.Zoom.Percentage = 59
Case Is <= 573
Myform2.AxFramerControl1.ActiveDocument.View.Zoom.Percentage = 60
Case Is <= 582
Myform2.AxFramerControl1.ActiveDocument.View.Zoom.Percentage = 65

REgarding Serial Port Communication With Greater Ports
Hi,
Actually i have to set serial ports greater than 16 for communication.
for that i used
There was a hack that came around about modifying the MsComm control to
access greater than 16 ports:
"In the code there is a unique sequence of three bytes, 3d 10 00. Pick a hex
editor and change the value 10 to say 7f. Now you have changed the default
value of a variable MAX_PORTS to 127. The name of the variable is arbitrary.
Save the changed file and off you go." the problem in using this was when some one reinstall the setup the ocx which we created is getting replaced by the old ocx so is there any way to replace an ocx(Mscomm32.ocx) which is being used by the project by another ocx which i has made by hacking the existing ocx and stored in the system file ,this has to replace the system ocx which is used by it at runtime .

give me other ways also for setting up communication with the higher ports

Creating Dotted/Dashed Lines With Thickness Greater Than 1
I am trying to draw lines using GDI32 APIs, but I want some of the lines to be thicker than 1 unit. Whenever I make the thickness greater than 1 unit, the line is always solid. Is there a way to draw lines which are thicker than 1 unit but still dotted or dashed in some way?

I'm currently using the following code, although I've also tried using CreatePen and it doesn't work either:

Code:
' Set up POINTAPI array for the outline based on beginning and ending points
Pts(1).X = pBeg.X: Pts(1).Y = pBeg.Y
Pts(2).X = pEnd.X: Pts(2).Y = pEnd.Y

'Create a new pen
LP.lopnColor = vbBlack
LP.lopnStyle = PS_DOT
LP.lopnWidth.X = 2
hPen = CreatePenIndirect(LP)
' hPen = CreatePen(PS_DOT, 2, vbBlack)

'replace the current brush with the new brush
oldPen = SelectObject(lhDC, hPen)

' Draw the line
DrawLine = Polygon(lhDC, Pts(1), 2)

'replace this form's pen with the original one
SelectObject lhDC, oldPen

'delete our new pen
DeleteObject hPen

I Need VB Tweak, To Delete All Rows In A Column That Have A Number Greater Than 150.
Here is what I have
Sub Showonlypendingleaks()
Dim ZoekIn As Range, Vind As Range
Dim celtel As Range, Wat As String

Wat = ">150"
Set ZoekIn = Columns(4).Find(Wat) 'look in column 4 for ">150"
If celtel Is Nothing Then
Set celtel = ZoekIn
End If
If Not ZoekIn Is Nothing Then
Set Vind = ZoekIn
Do
Set celtel = Union(celtel, ZoekIn.EntireRow) Set ZoekIn = Columns(4).FindNext(ZoekIn)
Loop While Not ZoekIn Is Nothing And ZoekIn.Address <> Vind.Address
End If

celtel.Select Selection.Delete
Range("A1").Select



End Sub

Only Resize Certain Listview Column If It Is Greater Than Current Width
Hi Guys,

I am using the following code to resize listview columns according to their contents.


Code:
For Col2Adjust = 1 To Lv.ColumnHeaders.count - 1
If (Col2Adjust = 2) Then
Debug.Print Lv.ColumnHeaders(2).Width
If (Lv.ColumnHeaders(2).Width > 6423.875) Then
Call SendMessage(Lv.hWnd, _
LVM_SETCOLUMNWIDTH, _
Col2Adjust, _
ByVal LVSCW_AUTOSIZE_USEHEADER)
End If
Else
Call SendMessage(Lv.hWnd, _
LVM_SETCOLUMNWIDTH, _
Col2Adjust, _
ByVal LVSCW_AUTOSIZE_USEHEADER)
End If
Next


As you can see I want to skip column 2. I only want to resize column 2 if the width is greater than what I have specified there. But it isn't working.

Any ideas.

Passing Data Greater Than 255 Char From VB To Crystal Reports
To pass data from VB to Crystal reports we generally use the Formula fields.
But unfortunatley the length is limited to 255 char only.
Is there a way to pass data greater than 255 char? I don't want to use multiple
formula fields and split the data into 255 char blocks.

Abhijeet

This Is For Wossname: My Attempt To Remove Dups From A 50mb Or Greater File
Hi.

Wossname had a thread a few days ago, but it now seems to be deleted. His thread was about how to remove duplicate "records"
from files whose size might be 50mb or greater, without loading the whole thing into mem. Well, I don't really think I accomplished that, since what I developed loads the whole thing into a control array of 100 list boxes. Anyway, seeing how his thread seems to be deleted, I'm just putting what I developed here, for anybody who's interested. I'm also going to fire off an e-mail to him to notify him to check this out, see if it might be something he could use.

Be forwarned, the technique illustrated with this project does NOT
sort, but just removes duplicates. AND I'm not sure its 100% effective, {I'm going to compare the output against a unix progie tomorrow morning}, BUT, I'm pretty confident in it. SOOO,
if you're not wossname, you could pretty much ignore this, unless you're a code'hound.


-Lou

Communicating To Serial Ports With Comm Port Number Greater Than 16
I want to connect to the serial port with comm port number greather than 16, im able to connect to ports with comm port number less than 17 using MSCOMM control in visual basic, but i need to communicate to ports till 256, can anyone please help me out on this.

Possibillity To Create A Form Size Greater Then Screen Size
Hello VB users,

I am trying to create a form size greater then screen size.
For example to create a area of a big factory.
To move to a part what is not on the screen you have to use a scroll bar.

Is this possible? If yes, how do I do this?

Nice regards,

Michelle.

Making Form Size Greater Than Screen Size
I trying to print a form with graphics. I'm simply using the PrintForm statement. The problem is that the screen size doesn't allow the form to expand to a full page. Meaning, I can only print on the top three-quarters of the page.

My question is how can I make the form height increase to greater than the screen height?

Ideally, I'll display this expanded form in a MDI parent window that allows the user to scroll to the bottem part of the expanded form.

Copyright © 2005-08 www.BigResource.com, All rights reserved