Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ClickHere

    adding currency values

    Thank you. Glad I could help.
  2. ClickHere

    adding currency values

    Try this tempmisc1 = Format(misc1.Text,"###0.00") tempmisc2 = Format(misc2.Text,"###0.00") tempmisc3 = Format(misc3.Text,"###0.00") tempmisc4 = Format(misc4.Text,"###0.00") tempmisc5 = Format(misc5.Text,"###0.00")
  3. ClickHere

    adding currency values

    If textbox.text = "$1.00" then Val("$1.00") will = 0 because of the $. This is reason your total is 0. So here are a couple of options. 1) Remove the $ from each textbox before using the Val function 2) Change all of your textboxes to Masked Edit boxes with the Format property set to...
  4. ClickHere

    Spurious decimals

    Looks like a good place to use the Decimal data type. Take a look at thread222-537500 Have a great day!
  5. ClickHere

    drag from listview to treeview problem (simple I think)

    Try putting the code you've shown here in the MouseDown event instead of MouseMove. Hope this helps.
  6. ClickHere

    Reordering Listview

    I couldn't get your way to work either. But, until something better comes along, this is what I came up with. Private Const NumOfColumns = 3 'Change this to the number of columns in your listview Private ColText(NumOfColumns) As String Private Sub cmdMoveUp_Click() Dim itmX As ListItem...
  7. ClickHere

    Help adding items to a listview control

    Aaaargh, misprint. itm & itmX are the same variable
  8. ClickHere

    Help adding items to a listview control

    Try something like this Dim itm As ListItem For T = 1 To 5 Set itm = ListView1.ListItems.Add(, "Item" & Cstr(T), "A") itmX.SubItems(1) = "B" itmX.SubItems(2) = "C" itmX.SubItems(3) = "D" Next T Hope this helps
  9. ClickHere

    Add selected list box items to clipboard

    If I understand correctly, you want all selected items to land on the clipboard at once. Something like this should work. Dim i As Integer Dim strClip As String strClip = "" With List1 For i = 0 To .ListCount - 1 If .Selected(i) Then strClip = strClip &...
  10. ClickHere

    Trouble drawing lines

    This may not be the best way to handle it, but you can try this. Use another picturebox to hold the original picture as you draw your line. picOriginal.Visible = False Then apply these changes to your code. Option Explicit Dim LinCol as Long 'Not String Private Declare Function BitBlt Lib...
  11. ClickHere

    How to catch certain word from sentence..

    Or simply... Dim ptr As Long ptr = InStrRev(Text1.Text, "\") Label1.Caption = Right(Text1.Text, Len(Text1.Text) - ptr)
  12. ClickHere

    When moving apps, Always use the "Package and Deployment Wizard".

    TheTuna, Thanks for the response. I'll give it a try.
  13. ClickHere

    When moving apps, Always use the "Package and Deployment Wizard".

    I've never tried Visual Studio Installer. Does it automatically include all for the .ocx's and .dll's that your app is dependant on like PDW? I have a favorite setup packager, but, first I'll run PDW to create the setup.lst. Then I'll use that list in the other packager where I have more...
  14. ClickHere

    Two variables with the same value are NOT equal

    Thanks chiph and Robse. Those are good work-around ideas also. And I probably would have gone one of those routes had johnwm not opened my eyes to the Decimal data type. So far it's working slicker-than-cat-slobber. And he answered my main question 'WHY'. I mean, even a simple calculator...
  15. ClickHere

    Two variables with the same value are NOT equal

    Thanks alot johnwm. The Decimal data type has done the trick. Although using the name Decimal (Private A as Decimal) gives a compile error. I can however use the literal char for Decimal (Private A@). Seems to work great. A star for you. Thanks again.
  16. ClickHere

    Two variables with the same value are NOT equal

    Is there a logical explanation why the following code will not work? I came across this problem in an app I'm working on where I have to increment a variable ('A') by .1 inside of a loop and If 'A'='B' then 'do something'. It works fine when 'B' is 1.1 or 1.2, but when it's 1.3 and above, it...
  17. ClickHere

    Assigning variable value to txtbox prob

    Bravo, vb5prgrmr That solution never came to mind. You know how it is, you look past the simple things for something complex.
  18. ClickHere

    Assigning variable value to txtbox prob

    Hmmmm, I may be wrong but this is what I see. If this is what you have in your list CmbEfficiency.AddItem "Stechiometric", 0 CmbEfficiency.AddItem "Phd-50/HD-2000", 1 CmbEfficiency.AddItem "Fif-50", 2 CmbEfficiency.AddItem "Bags", 3 And...
  19. ClickHere

    FOR NEXT - NESTING - FORMATING

    It looks to me like your trying to print 4 tickets(or 4 somethings) per page. I wouldn't try another loop. Maybe just increment 1 variable inside the loop, like this Private Sub Command1_Click() Dim a As Integer Dim nIndex As Integer Dim x As Integer Dim tickets As Integer Dim y...
  20. ClickHere

    Convert txt file to HTML

    Probably the easiest way would be like this... Dim textFile As String Dim htmlFile As String textFile = "YourPath\YourFile.txt" htmlFile = "YourPath\YourFile.html" Name textFile As htmlFile 'Rename the file to html 'Use it here Name htmlFile As...

Part and Inventory Search

Back
Top