Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
G

Garner T

@Garner T
About
Posts
19
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Upgrade VB6 Database to VB10
    G Garner T

    Thanks everyone for all of the information! Now I will have to see if my mind can absorb enough of it to make my code work. If not I know where to come for more help. Thanks again, Garner

    Visual Basic database tutorial question

  • Upgrade VB6 Database to VB10
    G Garner T

    I pretty much figured out that everything was different when none of my code worked anymore and nothing that I did helped. That was pretty much my original question. What do I read and where do I find it? I have read stuff online for hours in forums, MSDN, sample code ...? I have looked for books on the subject but I haven't found anything that seems like it would help. In VB6 I went to the book store, picked up a book, "Visual Basic 6 Database Programming," and everything I needed was there. No such luck with VB10.

    Visual Basic database tutorial question

  • Upgrade VB6 Database to VB10
    G Garner T

    Now I think I’m worse off than I originally thought since I don’t even know how to answer your question. Guessing “UI” means “User Interface?” If so, I think that is where my problem is. Here’s the old VB6 code I used for my “Update” button in the user interface. VB10 highlights just about all of it with all kinds of errors. The worst part is that I have several buttons in each of several interfaces controlling several databases. “Add,” “Update,” “Delete,” & “Refresh” are the buttons that I am using. Private Sub cmdUpdate_Click() On Error GoTo UpdateErr Dim db As Database Set db = OpenDatabase("c:\microsoft visual studio\vb98\openaccts.mdb") Dim rs As Recordset Set rs = db.OpenRecordset("prices", dbOpenDynaset) 'Edit record and show new prices. rs.Edit rs.Fields("1b") = txtFields(0) rs.Fields("2b") = txtFields(1) rs.Fields("2r") = txtFields(2) rs.Fields("3a") = txtFields(3) rs.Fields("3s") = txtFields(4) rs.Fields("as") = txtFields(5) rs.Fields("br") = txtFields(6) rs.Fields("bs") = txtFields(7) rs.Fields("fd") = txtFields(8) rs.Fields("ms") = txtFields(9) rs.Fields("os") = txtFields(10) rs.Fields("ts") = txtFields(11) rs.Fields("tu") = txtFields(12) rs.Fields("ws") = txtFields(13) rs.Update 'Change prices on PRODUCT form. frmprdm!txt1b.text = rs.Fields("1b") frmprdm!txt2b.text = rs.Fields("2b") frmprdm!txt3a.text = rs.Fields("3a") frmprdm!txt3u.text = rs.Fields("3s") frmprdm!txtas.text = rs.Fields("as") frmprdm!txtbr.text = rs.Fields("br") frmprdm!txtbs.text = rs.Fields("bs") frmprdm!txtfd.text = rs.Fields("fd") frmprdm!txtms.text = rs.Fields("ms") frmprdm!txtou.text = rs.Fields("os") frmprdm!txtts.text = rs.Fields("ts") frmprdm!txttu.text = rs.Fields("tu") frmprdm!txtws.text = rs.Fields("ws") Exit Sub UpdateErr: MsgBox Err.Description End Sub I have read a ton of information online about changing the code and; so far, none of it has worked for me. Thanks, Garner

    Visual Basic database tutorial question

  • Upgrade VB6 Database to VB10
    G Garner T

    I wrote a large Database program in VB6 that worked well for many years. Now I am trying to re-write that program in VB10. I was able to figure out how to make everything work except for the main element, the Database controls. Is there something that I can read to learn how the new code works? Thanks, Garner

    Visual Basic database tutorial question

  • Listbox
    G Garner T

    How about?: If speed > 0 then ListBox1.Enabled = False

    Visual Basic question performance

  • Help me, help me !
    G Garner T

    Hi Baggio, I am just guessing here because the "smile" covered up part of the error. I think that I had this problem once. My error was located in this part of the code:

    baggioberto wrote:

    Private Sub adcVT_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

    The problem was that I tried to type in the procedure's heading instead of selecting it from the drop down boxes. I had one letter wrong which generated the error. You can also get this error if you try to put code for a different procedure under the wrong heading. I know that I haven't explained this very well but I'm hoping that you can figure out what I'm trying to say. Good luck, Garner

    Visual Basic help regex question

  • How to connect VB6 to MSExel
    G Garner T

    Jijo, I have been fighting with a similar problem for months. Nothing seems to work for me but this code might give you a start. Set AppExcel = CreateObject("Excel.Application") AppExcel.Workbooks.Open FileName:="Put Your Excel Address Here.xls" Hope you have better luck than I have been! Garner

    Visual Basic help tutorial

  • Where is invisible problem in the code here?
    G Garner T

    This is just a guess. Wouldn't the ( xAddr="" ) set a blank each time the program made a loop?

    Visual Basic question csharp database help

  • New to Programming
    G Garner T

    Post you question to "devX" forum. The people there are not rude and they will try to help you. I would try to help you but I'm still learning myself.

    Visual Basic design tutorial csharp help

  • Error code information?
    G Garner T

    Hi all, Is there a book or web site that has all error codes listed with a good description of what each one means? Thanks, Garner

    Visual Basic help question learning

  • "Sub" is short for...?
    G Garner T

    Page 422, chapter 9, of "Visual Basic 6 Complete", Table 9.5: Statements Supported in VBScript. Sub - Declares a Subroutine Looking at the example provided, a subroutine is a division or seperate event happening inside of an "event procedure" as described below. Page 42, chapter 4, "Visual Basic 6 For Dummies" In Visual Basic lingo, subprograms are event procedures (although some programmers may call them subroutines). So my understanding would be that a "Sub" is actually an "Event Procedure" and a "Subroutine" is inside of an event procedure and seperated by a marker consisting of an apostrophe followed by a tilde ('~). The example is provided on page 441, chapter 9, of "Visual Basic 6 Complete". Hope this helps, Garner

    Visual Basic question

  • Finding a Excel.exe file in drives
    G Garner T

    Kalaiselvi, I'm not sure what you mean but I'll take a stab at it. If you are using you "search" feature I think that you could just use a wild card. Search for: *.exe should show all exe files. Search for: */excel.exe should show all excel.exe files. Hope this helps, Garner

    Visual Basic tutorial

  • Urgent - Excel/Word Macro Question
    G Garner T

    Steve, If you don't intend to help why do you even waste our time with your insults? Yes, there are many helpfull people here that will go out of their way to help others! That is what this forum is all about, one person helping another. I have gotten tons of help from great people on this forum and if I can help someone with my limited abilities I will. Yes, that is what this is all about. People helping other people FREE, GRATIS, FOR NOTHING, ZIP, ZERO except for the possible return of someone else helping them. I have had people send helpfull code to me and I have sent code to others. I have never been charged for the help that I've received and I've never asked anyone to pay me. If you want paid then I think that you are on the wrong sight.:confused:

    Visual Basic tools question

  • How to resize the form and its controls according to the screen resolution
    G Garner T

    I have been watching this question since it appeared. When I write a program on my computer then try to run it on another one, it is always to big to fit on the screen. I have to crank my resolution down to write programs for other computers. When you buy a program it always seems to automaticly fit the screen of whattever computer that you run it on. I think that anyone who can answer this question will be helping more than the three of us! Thanks, Garner

    Visual Basic csharp visual-studio help tutorial

  • Invoking Excel from Access VBA code
    G Garner T

    Johnny, Since you seem to know how to use VB & Excel together, is there any chance that you would have time to look at my Jan. 6th Post, "VB/Excel interaction"? I have tried everything that I can think of and I still can't make it work. Nobody else has answered. Thanks in advance, Garner

    Visual Basic help css wpf tutorial

  • Invoking Excel from Access VBA code
    G Garner T

    I have been having trouble with Excel myself so I don't know if I can be of any help to you. My suggestion would be to try recording a macro of what you want to do. Copy and paste the code it generates into your subs and then tweak it to suit your needs. That got my program "close" to working but finding answers for Excel seems to be very difficult. Hope this helps, Garner

    Visual Basic help css wpf tutorial

  • VB-6 / Excel interaction
    G Garner T

    Hi all, I am new to this forum so please bear with me until I learn how things are done here. I am trying to write a “VB-6” program where the user can click on a picture of a part and the program then opens an “Excel” price list for them. I used a transparent text box over the picture. You can start the program, click the picture, and an “Excel” window opens with the proper line highlighted. Then, if you close the “Excel” window and try to click on the picture again, the program balks. Part of the “Excel” window appears but it is empty. The program doesn’t crash. It just refuses to show the “Excel” sheet again. This is the code that I used: Dim AppExcel As Excel.Application This sub sets the focus on the picture so the scroll bar doesn’t blink. Private Sub Form_Activate() p4l80e.SetFocus End Sub This sub tells the program to open “Excel”. Private Sub Form_Load() Set AppExcel = CreateObject("Excel.Application") Workbooks.Open FileName:="D:\K and D (152598).xls" End Sub This sub makes “Excel” visible, finds the proper row, and highlights the entire row. Private Sub lbl034_Click() 'On Error GoTo erh AppExcel.Visible = True Cells.Find(What:="34034b", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate 'Highlights the entire row. If IsEmpty(ActiveCell) Then Exit Sub On Error Resume Next If IsEmpty(ActiveCell.Offset(0, -1)) Then Set LeftCell = ActiveCell Else Set LeftCell = ActiveCell.End(xlToLeft) If IsEmpty(ActiveCell.Offset(0, 1)) Then Set RightCell = ActiveCell Else Set RightCell = ActiveCell.End(xlToRight) Range(LeftCell, RightCell).Select Exit Sub erh: MsgBox Error(Err) End Sub This is a different attempt at the above code with a different part number. It will work the first time around also. Second attempt, it also will not respond. Private Sub lbl070_Click() On Error GoTo erh 'Set AppExcel = CreateObject("Excel.Application") Workbooks.Open FileName:="D:\K and D (152598).xls" Cells.Find(What:="34070e", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate AppExcel.Visible = True Exit Sub erh: MsgBox Error(Err) End Sub The following code works fine. It just controls the scroll bar to move the picture of the parts to be selected. Private Sub scr_Change() On Error GoTo erh p4l80e.Top = scr.Value ' p24L80E.Top = sc

    Visual Basic help career

  • VB-6 Project
    G Garner T

    Hi Paritosh, I thought that this was the problem but I haven't figured out how to do it. If I use a "close" event in the sub that shows the "Excel" workbook, the workbook flashes on the screen and back off before you get to look at it. I tried to put it in my main form "activate" sub and that didn't work either. I need this to happen automaticly as the user closes the "Excel" window so they can just click on another part of the picture. Could you give me an idea of what the code would look like and what sub to put it in? Like I said, I'm "self-taught" in "VB" so my teacher isn't the sharpest tool in the shed. Thanks again, Garner

    Visual Basic help career

  • VB-6 Project
    G Garner T

    Hi all, I am new to this forum so please bear with me until I learn how things are done here. I am trying to write a “VB-6” program where the user can click on a picture of a part and the program then opens an “Excel” price list for them. I used a transparent text box over the picture. You can start the program, click the picture, and an “Excel” window opens with the proper line highlighted. Then, if you close the “Excel” window and try to click on the picture again, the program balks. Part of the “Excel” window appears but it is empty. The program doesn’t crash. It just refuses to show the “Excel” sheet again. This is the code that I used: Dim AppExcel As Excel.Application This sub sets the focus on the picture so the scroll bar doesn’t blink. Private Sub Form_Activate() p4l80e.SetFocus End Sub This sub tells the program to open “Excel”. Private Sub Form_Load() Set AppExcel = CreateObject("Excel.Application") Workbooks.Open FileName:="D:\K and D (152598).xls" End Sub This sub makes “Excel” visible, finds the proper row, and highlights the entire row. Private Sub lbl034_Click() 'On Error GoTo erh AppExcel.Visible = True Cells.Find(What:="34034b", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate 'Highlights the entire row. If IsEmpty(ActiveCell) Then Exit Sub On Error Resume Next If IsEmpty(ActiveCell.Offset(0, -1)) Then Set LeftCell = ActiveCell Else Set LeftCell = ActiveCell.End(xlToLeft) If IsEmpty(ActiveCell.Offset(0, 1)) Then Set RightCell = ActiveCell Else Set RightCell = ActiveCell.End(xlToRight) Range(LeftCell, RightCell).Select Exit Sub erh: MsgBox Error(Err) End Sub This is a different attempt at the above code with a different part number. It will work the first time around also. Second attempt, it also will not respond. Private Sub lbl070_Click() On Error GoTo erh 'Set AppExcel = CreateObject("Excel.Application") Workbooks.Open FileName:="D:\K and D (152598).xls" Cells.Find(What:="34070e", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate AppExcel.Visible = True Exit Sub erh: MsgBox Error(Err) End Sub The following code works fine. It just controls the scroll bar

    Visual Basic help career
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups