Search:
Type: Posts; User: Mr.Mac
Search:
Search took 0.20 seconds.
-
Good work! I was going to suggest an entirely different way
(which works)
Mac
Option Explicit
Private Sub cryptFile(myFile As String)
Open "z.dat" For Binary As #1
-
What file?
You need to show your code that actually writes a file, including the OPEN and CLOSE
Mac
-
Any reason to insist on math.max?
Try using an array of text1 and do something like this
Private Sub Command1_Click()
Dim i As Integer, Max As Single, v As Single
Max = 0
For i = 0 To...
-
Uh, what is "ListView1"?
Mac
-
Uh, like this?
Option Explicit
Private Sub Command1_Click()
Dim L As String
Open "z.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, L
List1.AddItem L
-
Your code:
If time(i) = "00.00" Then
'miss the line below the end if
End If
If time(i) > time(i + 1) Then
temporary = time(i)
...
-
But not appreciated enough to be acknowledged.
:(
Mac
-
============ Form1
Option Explicit
Private Sub Form_Load()
Randomize
Dim i As Integer
For i = 1 To 3
Dim r As String
r = Str$(Int(Rnd * 10000))
List1.AddItem r
Next i
-
I would build a BAT file that did the backup. Forget VB.
If you prefer to have a BACKUP button, then have it do
SHELL "(here is the path to your BAT file)"
Mac
-
Run this and see if it is what you mean.
Note that if your message is "Who is the president" then any misspelling will give no match. "Who is president" (missing "the") will not match.
For...
-
We could "get anywhere" if you would quit using the term "database". Just say you will create a file which contains messages and replies and you want to know how to find a reply, given a message....
-
learn how to work with databases
"database" is a very vague term.
It can mean a commercial product such as MS Access or Oracle or Sybase. Some of these cost thousands of dollars and support...
-
Well, I don't know what you expect to do with the passed variable, intSize. I would forget about that. But anyway, now you need to write this:
Public Function strReverse(Num As Integer) As Integer...
-
Oops, sorry. My problem was not lack of knowledge of the definition of sort types, but lack of care in reading your code.
You supplied SortX as shown in the demo below. But as you had two...
-
Isn't that the "selection sort" you presented?
I remember the bubble sort as being something like this
1) Record that no item was swapped
2) Make a pass at array swapping any two adjacent...
-
No problem if you know the definition of all possible virus code and the likely programs they infect. Notice that commercial products require periodic download of more stuff.
So "possible", yep.
...
-
Gosh, it's hard to communicate.
I DID NOT INTEND TO IMPLY THAT THE OP SHOULD CODE GOSUB-TYPE SUBROUTINES. I PRESUMED HE WOULD USE THE SUB.
I wanted to show how subroutines (no matter how...
-
Sorry you think so.
I intended it as a hint for someone who is confused on the problem, not on VB. It shows three good hints for SUB's. Naturally, I would not provide VB code to do that....
-
Well, here is a QBasic answer for a hint.
Mac
CLS
DIM n(19) AS INTEGER
DATA 334, 384, 105, 222, 61, 2, 175, 228, 114
DATA 235, 241, 213, 206, 3, 321, 152, 214, 137, 224
-
Well, only the OP knows for sure.
I would bet that the OP didn't literaly mean 5,4,3, etc. but was using that as an example.
The OP merely wants to make a LIFO-type display. Whatever is added...
-
ROFL!
I presume you were joking. Your first was the obvious correct answer.
-
Thanks! Will add this to my post
http://www.vbforums.com/attachment.php?attachmentid=61663&stc=1&d=1200424431
Hope it works.
Mac
:)
-
Regulars: An off-topic question.
Is there a way to save ZIP files here, rather than being forced to the technique I used? If so, how?
Mac
-
Maybe you missed the implications of my study. Did you run it? Maybe it appeared not to run because I neglected to recommend a time for the timer event. I got useful info using 50. Or maybe you...
-
Public Sub BackupMembersFile()
FileCopy "Members.dat", "MembersCopy.dat"
End Sub
-
Here is a study which may be of interest
Mac
Option Explicit
Dim UDLR As String * 1
Dim intX As Integer, intY As Integer ' Where snake head is
Const zTop = 10, zBot = 300, zLeft = 10,...
-
Uh, that's probably it. I have VB5.
Mac
-
Don't understand. This works fine, even the result is weird.
Private Sub Command3_Click()
Dim i As Long
For i = 1 To 32770
List1.AddItem "test"
Next i
MsgBox List1.ListCount
Unload Me
-
You're welcome! I presume you got rid of the DO/LOOP and instead let VB and the user do the looping for you, as demonstrated.
Mac
-
If you were a super-guru, you might have a slight chance of getting something like that working eventually. But given you have no clue, I recommend you look into commercial applications that do that....
-
Thanks for the hint. That works.
Mac
-
I only need those values when running via EXE. In debug mode, I set them via other means to values of interest only to the developer (me)
The code you supplied worked like a champ! Thanks a lot! I...
-
I would like my application to run slightly differently if I am running interactively as opposed to compiled.
I couldn't find this in the FAQ.
I am temporarily calling my EXE with a COMMAND$...
-
Well, we are drifting far from the original thread topic.
Let me just say that it is unusual to attempt to import data into a VB program like you are doing. Why don't you just mark this thread...
-
Make all your text boxes "multiline true" then after
For i = 0 To 4
Work1 = Work1 + Text1(i).Text
Next iInsert
Do
i = InStr(Work1, Chr$(13) + Chr$(10))
If i > 0 Then Work1 =...
-
Well, you change the specs, making this a boring project.
I am going with these final specs:
There are 4 fields to hold 4 characters each
There is a final field to hold any remaining.
If...
-
I had to put the disable for unknown reasons, but I can enable it again when the next field gets control. And ignoring spacebar's are easy. If the user enters "ab cd ef" it will be the same as...
-
With all due respect, Code Doc, your submssion sucks.
Reason: It simply doesn't work.
Do this:
1) Open NOTEPAD and place this therein: "aaabbbbbcccccccccc"
2) Highlight it and do ctrl-C...
-
Have you tried my version? I give it again with 3,5,10 layout. Please load and try it. It works perfectly if you get "33355555tttttttttt" into the clipboard and post it in textbox1.
The only...
-
When I tried your code, three characters went into box 1 and then it seemed to take infinite charracters in box 2. It never swapped to box 3. Further, the cursor was one character to the left in box...
|
Click Here to Expand Forum to Full Width
|