Search Results - VBForums

Search:

Type: Posts; User: Yumby

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    510

    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,...
  2. Replies
    2
    Views
    510

    [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...
  3. Replies
    11
    Views
    714

    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....
  4. Replies
    11
    Views
    714

    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...
    ...
  5. Replies
    11
    Views
    714

    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.
  6. Replies
    11
    Views
    714

    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)...
  7. Replies
    11
    Views
    714

    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...
  8. Replies
    5
    Views
    479

    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....
    ...
  9. Replies
    5
    Views
    479

    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,...
  10. Replies
    5
    Views
    1,435

    Re: Javascript Alerts

    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...
  11. Replies
    5
    Views
    1,435

    Re: Javascript Alerts

    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,...
  12. Replies
    5
    Views
    1,435

    Javascript Alerts

    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...
  13. Replies
    2
    Views
    495

    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....
  14. Replies
    2
    Views
    495

    [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...
  15. Replies
    12
    Views
    610

    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...
  16. Replies
    12
    Views
    610

    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...
  17. Replies
    12
    Views
    610

    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...
  18. Replies
    12
    Views
    610

    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...
  19. Replies
    12
    Views
    610

    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...
  20. Replies
    12
    Views
    610

    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...
  21. Replies
    2
    Views
    369

    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 &...
  22. Replies
    2
    Views
    369

    [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
    Read the first word
    Store the word in wordat(1)
    Read the second word
    Store that...
  23. Replies
    6
    Views
    491

    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...
  24. Replies
    6
    Views
    491

    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...
  25. Replies
    6
    Views
    491

    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...
  26. Thread: Format the date

    by Yumby
    Replies
    2
    Views
    1,051

    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...
  27. 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.
  28. [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...
  29. Replies
    6
    Views
    642

    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...
  30. Replies
    6
    Views
    642

    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.
  31. Replies
    6
    Views
    642

    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...
  32. Replies
    6
    Views
    642

    [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...
  33. Replies
    4
    Views
    550

    Re: [RESOLVED] DateAdd Without Seconds

    Ok thanks for that anhn.
  34. Replies
    4
    Views
    550

    Re: DateAdd Without Seconds

    That works perfectly. Nice work Doogle.
  35. Replies
    4
    Views
    550

    [RESOLVED] DateAdd Without Seconds

    Hi. I'm trying to compare 2 dates to see if they match up (e.g. 1/05/2011 and 1/05/2011) but I'm doing something wrong. So my question is, how do I get rid of the seconds in the code below?


    y =...
  36. Replies
    9
    Views
    573

    Re: Listbox Run Time Error 13

    Sorry for the late reply. Okay understood. Don't use commas and so on and don't go more than 32,767 entries. Problem solved. Thanks for the help guys.
  37. Replies
    9
    Views
    573

    Re: Listbox Run Time Error 13

    Thanks for the replies guys. Thanks to your help I seem to be getting closer to solving this problem. But it's going to take me a while. The only other information I can add is.....

    When the...
  38. Replies
    9
    Views
    573

    Re: Listbox Run Time Error 13

    I took out all the commas but the error still kept appearing. The error occurred at this line....


    x = (secondvalue(1)) * (thirdvalue(1) / 100)

    In the above code.....

    x = Empty...
  39. Replies
    9
    Views
    573

    Re: Listbox Run Time Error 13

    In the General Declarations section I have...


    Dim secondvalue(100)
    Dim thirdvalue(100)

    To fill the listboxes I do...


    For x = 1 To 10
  40. Replies
    9
    Views
    573

    [RESOLVED] Listbox Run Time Error 13

    I have two listboxes. The 1st listbox has the numbers 1 to 10 in it. The 2nd listbox has the numbers 1.00 to 10.00 (increasing by 0.01) in it. And when I calculate these numbers everything is fine....
Results 1 to 40 of 123
Page 1 of 4 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.