Skip to content

Visual Basic

Visual Basic Questions

This category can be followed from the open social web via the handle visual-basic@forum.codeproject.com

34.4k Topics 120.1k Posts
  • Showing modeless form in VB DLLs called from MFC

    c++ question com help tutorial
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Formatting duplicates in excel

    algorithms question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • MDI and Bitmap

    graphics question
    2
    0 Votes
    2 Posts
    8 Views
    L
    If you mean you're trying to place a bitmap on the MDI parent, then you need to place a picture box first and then load the bitmap into it!
  • comunication

    c++ help tutorial question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Plus! Settings, large icons, et al.

    windows-admin json tutorial question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Dates and period in between (Excel VBA)

    question
    5
    0 Votes
    5 Posts
    10 Views
    I
    This works but I am open to simpler suggestions Dim TheDate As Date ' Declare variables. Dim Msg Dim hey Dim Ms Dim instal Dim instmon Dim mon TheDate = Date Msg = DatePart("m", TheDate) ' Msg now equals the number current month number dayDate = Date Ms = DatePart("d", dayDate) 'Ms now equals the current day number If Ms >= 8 Then Msg = Msg + 1 End If instal = 15 & "th " If Msg = 1 Then mon = "January" End If If Msg = 2 Then mon = "February" End If If Msg = 3 Then mon = "March" End If If Msg = 4 Then mon = "April" End If If Msg = 5 Then mon = "May" End If If Msg = 6 Then mon = "June" End If If Msg = 7 Then mon = "July" End If If Msg = 8 Then mon = "August" End If If Msg = 9 Then mon = "September" End If If Msg = 10 Then mon = "October" End If If Msg = 11 Then mon = "November" End If If Msg = 12 Then mon = "December" End If ActiveSheet.Cells(87, 3).Value = instal & mon ActiveSheet.Cells(87, 4).Value = "monthly" ActiveSheet.Cells(88, 3).Value = "15-03-02" Else If freq = "weekly" Then ActiveSheet.Cells(31, 2).Value = (ActiveSheet.Cells(29, 8).Value) / (fred + 1) ActiveSheet.Cells(31, 1).Value = (("Less " & fred + 1) & " payments @") ActiveSheet.Cells(31, 8).Value = (ActiveSheet.Cells(31, 2).Value) * (fred + 1) Dim i As Integer Dim datTemp As Date For i = 1 To 7 datTemp = DateAdd("d", i, Date) If Weekday(datTemp) = vbMonday Then ActiveSheet.Cells(87, 3).Value = datTemp ActiveSheet.Cells(87, 4).Value = "weekly" ActiveSheet.Cells(88, 3).Value = "25-03-02" 'MsgBox "Next Monday will be " & datTemp End If Next
  • TextBox Question

    question
    3
    0 Votes
    3 Posts
    6 Views
    L
    When someone pushes a button, an event has occured. So, if they click on a button named command1, you could put code in the "OnClick" event that will update the text of your text box like: Private Sub Command1_Click() Text1.Text = "You clicked the button." End Sub:)
  • Outlook VB script: Print Method

    tools question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • ActiveX control for the web

    database com help sysadmin question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • please help

    question help
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • excel vba

    help question announcement
    6
    0 Votes
    6 Posts
    20 Views
    G
    Yep, becuase every time to Activate the workbook they are added. There is and Initialize event for a Workbook, but thats the only one to support the once only event. You could initialse it from there when the workbook opens. Giles
  • input validation

    help tutorial question
    8
    0 Votes
    8 Posts
    24 Views
    I
    Thanks It needs the end ifs moved up under the if bits and the loop put above the rest of the code and now it works fine. Thanks for your help. The examples on the microsoft website were very poor. Your help has been invaluable.
  • Microsoft Outlook 2000

    tutorial
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • "Unrecognized format"?

    database help question workspace
    3
    0 Votes
    3 Posts
    11 Views
    J
    You need the sp5 :-) Qapla
  • Timer refresh?

    question announcement
    2
    0 Votes
    2 Posts
    8 Views
    J
    maybe the DoEvents will help you? Qapla
  • test

    5
    0 Votes
    5 Posts
    10 Views
    U
    Well, you're not the only one who's confused here;-) What exactly are you trying to ask? -------------- "Criticism is often constructive because it makes you feel superior when you give it" -- Dogbert
  • Trying to detect Cancel in ShowPrinter

    com tutorial question
    2
    0 Votes
    2 Posts
    8 Views
    A
    Try this: On Error GoTo ErrHandler CommonDialog1.CancelError = True CommonDialog1.ShowPrinter Form1.PrintForm Exit Sub ErrHandler: End Sub If you have existing Error Handling code the ErrHandler would look a little different: ErrHandler: If Err.Number <> 32755 Then '32755 is the Error Number for Cancel being selected 'Process Error as usual End If End Sub Andy Gaskell, MCSD
  • General System Information

    sysadmin lounge
    2
    0 Votes
    2 Posts
    4 Views
    J
    Assuming you are talking Microsoft OS...MS Diagnostics holds most of what you've mentioned if not all and you could possibly get that info from the registry. I too would be interested in other methods to solve this problem. Best to you... \\Jim General System Information jamesdturner@hotmail.com jamesdturner@hotmail.com
  • Writing selected cells from Excel in csv

    tutorial
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Scrolling a form

    question help learning
    2
    0 Votes
    2 Posts
    4 Views
    L
    Hehe, Why not try EasyGrid ActiveX? It'll be helpful. I guess it can be found in the web. But I forget the Url. Try at altavista.com with the keyword of easygrid activex. best wishes.