Search Results - VBForums

# Search:

Type: Posts; User: Yumby

Page 1 of 4 1

1. ## Thread: [RESOLVED] Store hex number >255

by Yumby
Replies
5
Views
239

### Re: Store hex number >255

Solution = Convert number to hex, use mid to split the result, assign the results where required.

Thanks for the input guys.
2. ## Thread: [RESOLVED] Store hex number >255

by Yumby
Replies
5
Views
239

### Re: Store hex number >255

Thanks for the effort VBCR but that stuff is way too difficult for me to understand. Is there an easier way?
3. ## Thread: [RESOLVED] Store hex number >255

by Yumby
Replies
5
Views
239

### [RESOLVED] Store hex number >255

This may be a stupid question but how do I store a hexadecimal number that's >255?

If it's <=255 I do it like this....

Byte 1 = &H0
Byte 2 = &H0
Byte 3 = &H0
Byte 4 = &HFF

But if it's...
4. ## Thread: Check byte array for no value

by Yumby
Replies
26
Views
887

### Re: Check byte array for no value

Yeah that's okay. Maybe not 100% professional, but it's very clear in my mind that I'm working within the 0 to 255 range. Thanks.
5. ## Thread: Check byte array for no value

by Yumby
Replies
26
Views
887

### Re: Check byte array for no value

Yeah, from what I read recently, that' s right. And therefore, I could use the isempty function. I avoided it because I thought there might be problems with it in the future. I'll give it a try, yeah...
6. ## Thread: Check byte array for no value

by Yumby
Replies
26
Views
887

### Re: Check byte array for no value

Your 2D array theory has got me thinking, I could just use a counter.....

myarray(1) = &HC0
numbervalue = numbervalue + 1
myarray(2) = &HC0
numbervalue = numbervalue + 1
And then...

for x...
7. ## Thread: Check byte array for no value

by Yumby
Replies
26
Views
887

### Re: Check byte array for no value

Oh crap, sorry LaVolpe, no I'm putting hexadecimal values into the variables (myarray(1) = &HC0)
8. ## Thread: Check byte array for no value

by Yumby
Replies
26
Views
887

### Check byte array for no value

I'm trying to work out the following:

dim myarray(1 to 5) as byte

myarray(1) = "a"
myarray(2) = "b"

How do i check if myarray(3) has nothing in it?

This is my first time working with...
9. ## Thread: [RESOLVED] Drag a button on a form

by Yumby
Replies
2
Views
612

### Re: Drag a button on a form

I got it working. Thanks SamOscarBrown.

Dim newleft As Integer
Dim newtop As Integer

Private Sub btnbutton_MouseDown(Index As Integer, Button As Integer, Shift As Integer, leftpos As Single,...
10. ## Thread: [RESOLVED] Drag a button on a form

by Yumby
Replies
2
Views
612

### [RESOLVED] Drag a button on a form

I just want to move a button on a form at run time. When I do a mousedown and drag the button I get an outline of the button. But when I do a mouseup the outline disapears and nothing happens. So...
11. ## Thread: Too many If statements

by Yumby
Replies
11
Views
895

### Re: Too many If statements

I've decided to go with merging the For loops together (thanks to Si's tips) as this is the best way forward for me at the moment. Later on I'll check out the other code more closely if I need to....
12. ## Thread: Too many If statements

by Yumby
Replies
11
Views
895

### Re: Too many If statements

Yes I have, and I appreciate your help, but for some reason it isn't working for me. At the moment I'm looking at this code...
...
13. ## Thread: Too many If statements

by Yumby
Replies
11
Views
895

### Re: Too many If statements

I need to make the code more compact (which I have begun to do in the second piece of code I posted) so that I do not have a lot of If statements in my program.
14. ## Thread: Too many If statements

by Yumby
Replies
11
Views
895

### Re: Too many If statements

Here's some better code to let you know what's going on. This is the code I need to make more compact.

Do
For x = 1 To 10
z = Int((100 - 1 + 1) * Rnd + 1)
thevalue(x) = thename(z)...
15. ## Thread: Too many If statements

by Yumby
Replies
11
Views
895

### Too many If statements

I want to make sure that the random values I create are unique. So this is the code I use....

Do
For x = 1 To 3
thevalue(x) = Int((10 - 1 + 1) * Rnd + 1)
Next x
If...
16. ## Thread: Formatting A Number

by Yumby
Replies
5
Views
514

### Re: Formatting A Number

Thanks TJ. I tried variations of your code and this....

MessageBox.Show(New TimeSpan(Convert.ToInt64(2.5 * TimeSpan.TicksPerMinute)).ToString) This code got me 00:02:30

But this code....
...
17. ## Thread: Formatting A Number

by Yumby
Replies
5
Views
514

### Formatting A Number

I want to format a number to a time value. If my number is 2.5, this equals 2 and a 1/2 minutes, so the formatted number would be 02:30:00 (this includes milliseconds.)

I thought x = format(x,...

by Yumby
Replies
5
Views
1,585

Thanks again for the code akhileshbc, it's exactly what I needed (if I can I'll rep you some points.)

It'd still be good to know why I'm getting a blank messagebox though, so if anyone wants to...

by Yumby
Replies
5
Views
1,585

Thanks for the code but unfortunately it didn't solve my problem. Without the if statement I'm still getting a blank messagebox (after I type the 1st character.) Then, when I type the 2nd character,...

by Yumby
Replies
5
Views
1,585

My objective is to put some information from one field into another field as the user types the characters. But I'm stuck at step one. At the moment I'm just trying to get the information from the...
21. ## Thread: [RESOLVED] Remove quotation marks

by Yumby
Replies
2
Views
561

### Re: Remove quotation marks

Ah yes of course.... I did the line input, got rid of those quotation characters and now I'm looking at my new csv file with the correct characters/words. And the incorrect csv file is still intact....
22. ## Thread: [RESOLVED] Remove quotation marks

by Yumby
Replies
2
Views
561

### [RESOLVED] Remove quotation marks

I'm opening a csv file and I'm trying to check for quotation marks within the string so that I can remove them.

For example in the following "Trial "A" 123" I want to get it so that it's "Trial A...
23. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Re: Replace double spaces

Thanks Inferrd. Yes I'm using a TextFieldParser. I've been looking in the wrong areas for an answer and getting a big nothing. Your info/links look like they're on the money. So I'll check them out...
24. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Re: Replace double spaces

I have now.
Yes this appears to be the problem. I didn't know the read routine trimmed it. I've haven't come across any information or even a warning about this on the net. So I'll keep looking and...
25. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Re: Replace double spaces

Here's my current file/row....

"word1", "wo rd2", "word3 ", " word4"

And I tried this.....

If datval.Contains(" ") = True Then
MsgBox("2 spaces in " & wordat(x))

But it only...
26. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Re: Replace double spaces

Okay thanks for the help. I'm getting there (slowly). Long story short, how do I identify double spaces before and after a word? I've searched the net but no luck. Something like.....

If...
27. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Re: Replace double spaces

I'm just using a test file for now....

"word1", "word2", "word3 ", "word4"

I just did a quick test. When I use...

"word1", "wo rd2", "word3 ", "word4"

It identifies "wo rd2" but it...
28. ## Thread: Replace double spaces

by Yumby
Replies
12
Views
654

### Replace double spaces

Hi there, I'm trying to identify and fix double spaces in a string (that comes from a csv file.) My code originally came from kleinma in this thread, but after tweeking it, it's not working. On the...
29. ## Thread: [RESOLVED] Storing data in arrays

by Yumby
Replies
2
Views
419

### Re: Storing data in arrays

Thanks for that.

Dim wordat(9)
Dim thefil As String
Dim therow As String()
Dim datval As String
thefil = My.Application.Info.DirectoryPath &...
30. ## Thread: [RESOLVED] Storing data in arrays

by Yumby
Replies
2
Views
419

### [RESOLVED] Storing data in arrays

Hi all. I'm trying to get words from a csv file and then store them in my program. Like this....

Open the file
Store the word in wordat(1)
Store that...
31. ## Thread: Get month from date

by Yumby
Replies
6
Views
543

### Re: Get month from date

I just found out I don't have Split.... You know I think it's time I moved over to VB.Net once and for all. Okay thanks for your input everyone. Who knows, maybe we'll continue the conversation over...
32. ## Thread: Get month from date

by Yumby
Replies
6
Views
543

### Re: Get month from date

Yeah sorry, I should explain. The textbox I was using was just for my testing. The US date I want to change is in a csv file.
si_the_geek I actually did read your article, but I got confused, so I...
33. ## Thread: Get month from date

by Yumby
Replies
6
Views
543

### Get month from date

I'm trying to get the month from a date which is in the US format. So in the date 12/01/99 the month would be 12 (not 1). But I can't work it out. What am I doing wrong? Thank you.

ElseIf...
34. ## Thread: Format the date

by Yumby
Replies
2
Views
1,083

### Format the date

Hi all. I'm a javascript newbie and I'm stuck, so I've got some questions.

The first one is, I know you can store the date like this....
var mydate = new Date(2000, 11, 31);But on the web page...
35. ## Thread: [Excel 2007] How do I program this simple function?

by Yumby
Replies
3
Views
633

### Re: [Excel 2007] How do I program this simple function?

Thanks opus. I'll give it a shot when I can and I'll let you know how I go.
36. ## Thread: [Excel 2007] How do I program this simple function?

by Yumby
Replies
3
Views
633

### [Excel 2007] How do I program this simple function?

I'm using a function to put a price in a cell depending on how many days have passed. So 1 day = \$10, 2 days = \$20, 3 days = \$30 and I do it like this...

A1 (start date) = 01/01/2011
B1 (end...
37. ## Thread: [RESOLVED] Calendar control active day

by Yumby
Replies
6
Views
660

### Re: Calendar control active day

Got it. The problem was that I was storing the previously active day not the previously active date. So instead of using this....

calendarnumber = format(mycalendar.value, "d")I simply should...
38. ## Thread: [RESOLVED] Calendar control active day

by Yumby
Replies
6
Views
660

### Re: Calendar control active day

After taking a break from this problem, I've decided to give it another go. So, does anyone out there have any suggestions? Thanks.
39. ## Thread: [RESOLVED] Calendar control active day

by Yumby
Replies
6
Views
660

### Re: Calendar control active day

seenu_1st, I tried your code and it helped, thanks.

Doogle, an incorrect date is a date that isn't within a particular range. In my program the range is from the first day of the current month up...
40. ## Thread: [RESOLVED] Calendar control active day

by Yumby
Replies
6
Views
660

### [RESOLVED] Calendar control active day

Hi.... I'm using a calendar control and, if I click on an incorrect date, I want to put the focus back onto the date that was active before I clicked on the incorrect date. And I thought this would...
Results 1 to 40 of 131
Page 1 of 4 1

Featured