Search Results - VBForums

Search:

Type: Posts; User: westconn1

Page 1 of 13 1 2 3 4

Search: Search took 0.29 seconds.

  1. Replies
    3
    Views
    99

    Re: Type Mismatch

    you are testing if a string = true, which it does not, and is not of a type to match a boolean
    try more like

    rs.find "client_name = '" & txt_client.text & "'"
    if not rs.eof then msgbox "client...
  2. Re: Using ADO to retrieve multiple recordsets while executing a query only once

    then you would need separate queries

    you can avoid using the commandtext like

    Sql = "select max(f1) from [sheet1$]"
    rs.Open Sql, cn, adOpenStatic, adLockReadOnly
    Sql = "select * from[sheet5$]...
  3. Replies
    1
    Views
    83

    Re: Reading multiple files at a time

    are you sure it is the first file, not the last
  4. Re: Excel Worksheet Comments. Reading text colours

    on testing (xl2000) as far as i can tell color will always also return the colorindex (1 for black, 3 for red etc)
    mixed colors return null, linefeeds also return colorindex even though not visible...
  5. Re: [VS 2013/Excel] Crash when iterating over cells

    while in debug
    in vb6 /vba, hold mousepointer over in IDE, probably will still work for you
    else in code msgbox xlToRight
    or in the immediate window ?xlToRight
    or any other of the constants
  6. Re: [VS 2013/Excel] Crash when iterating over cells

    check if the xlconstants contain values when the code runs
  7. Replies
    10
    Views
    217

    Re: Copy Ranges in worksheet

    c.resize adjusts the size of the range

    c.end(xldown)row, finds the next cell below with no data or some data, opposite to starting point
    subtract c.row to give number of rows in range to copy
    ...
  8. Re: VBA swaps month and day pre the 13th day of the month

    it can happen here if the date is a string variable, but i tested your code, works correctly on today's date

    Dim mydate As Date
    mydate = Range("d16")
    Range("b16") = mydate...
  9. Replies
    10
    Views
    217

    Re: Copy Ranges in worksheet

    the error was occurring on the row where the table header was the current row, need to offset down 1 row
    i did not allow for table headers, as i did not know they were there


    Dim c As Range, sht...
  10. Re: VBA swaps month and day pre the 13th day of the month

    with bryce's code, try
    ws.Range("a2").Value = DateValue(dt)

    or just
    ws.range("a2").value = date
  11. Replies
    10
    Views
    217

    Re: Copy Ranges in worksheet

    i tested the code i posted, it an without error and pasted the data as required


    the error you get must apply to the line above or below the line you have quoted

    post your amended code in full...
  12. Replies
    10
    Views
    217

    Re: Copy Ranges in worksheet

    .resize adjusts the size of the range from a single cell, by how ever many rows and columns, it works similarly to .offset, if you want to use an offset to the starting range, must offset before...
  13. Replies
    10
    Views
    217

    Re: Copy Ranges in worksheet

    you can try like

    Dim c As Range, sht As Worksheet
    Set sht = ActiveSheet
    Set c = sht.Range("a7")
    c.Resize(c.End(xlDown).Row - c.Row, c.End(xlToRight).Column).Copy sht.Range("d7")
    Set c =...
  14. Replies
    3
    Views
    144

    Re: ActiveX Cannot create object. Excel

    try removing the new keyword
    without seeing the code in context, only a guess
  15. Replies
    5
    Views
    203

    Re: work with closed workbook

    ADO can do some really good data manipulation, with select queries, even when the workbook is open
  16. Replies
    8
    Views
    270

    Re: Setting directory

    is that the path to your files?
    did you test this to see if it works?
  17. Replies
    5
    Views
    203

    Re: work with closed workbook

    you can open a recordset read /write and save updates
  18. Re: Custom Action in Mail : Need to make it working like "reply to all"

    did you try
    myaction1.CopyLike = olReplyAll
  19. Replies
    3
    Views
    141

    Re: .insert full of undesired values

    did you try restart excel? windows?
  20. MsOf13 Re: MS Access VBA to Outlook - This SHOULD work?

    i made a similar test, works correctly for me
    where test existed under inbox

    Set inb = GetNamespace("mapi").GetDefaultFolder(olFolderInbox)
    Set nw = inb.Folders("test").Folders.Add("mytest")
    ...
  21. Re: Accessing RESTful services from an application server from Excel

    VBA is an application version (subset) of vb6, with additional application objects
    as you have already seen some object that exist in vb6 are not in VBA
    VB is windows based
    while some VBA works...
  22. Re: hide Excel instance and show only the userform

    resize the excel application window and position behind userform, reset when finished
  23. Replies
    5
    Views
    203

    Re: work with closed workbook

    you could use a formula in some cell to read the closed workbook
    but to write, you would need to open the workbook, either in excel (read value and close), or using ADO
    either way no need for...
  24. Replies
    1
    Views
    139

    Re: Office Interop Assemblies

    to work with office apps in any meaningful way, you would need some version of office installed
    if the version of office at home is different to that at work, or likely to be upgraded regularly, you...
  25. Re: Run Time error -624820215 (dac20009)

    in the else
  26. Re: Run Time error -624820215 (dac20009)

    not the best
  27. Replies
    1
    Views
    129

    Re: Help with two *.txt files.

    if you are doing this in 2010, it would appear to be a known problem in specificationname see
    support.microsoft.com/kb/2581495

    have you already created the specificationname in access?
  28. Re: Application-defined or object-defined error

    @ bryce
    this is the workbook sheetchange event, check thisworkbook code pane
    cover all sheets in a workbook

    i would assume that in all cases that the activesheet would be returned in SH...
  29. MsOf10 Re: Obtaining Name or index of selected CustomDocumentProperty

    what field types are you using for your document properties?
    unless you are using some numeric name for your customdocumentproperties, the above will not work, assuming your field indexes are in...
  30. Re: Foreign Language issues with commandbars in Excel

    i would assume that if you want to disable copy item on menu, you would probably also want to disable the standard toolbar button as well

    i only have excel 2000 on my computer, excel 2013 on a...
  31. Re: Foreign Language issues with commandbars in Excel

    i tested on 2013, index of in-built menus is 37, i found there to be 3 edit menus within the built-in menus
    test code worked correctly, but i am unsure if any menus are used (displayed) in this...
  32. Replies
    5
    Views
    211

    Re: run time error 1004 - see script below:

    this is not a valid file name, file names can not contain wildcard characters, if you want to work with all files in a folder named
    G:\Finance, Performance & Business Planning\Management...
  33. Replies
    2
    Views
    152

    Re: with Application.FileSearch

    you can use filesystemobject
    if you search application.filesearch alternative you should find several alternatives with code
  34. Re: Foreign Language issues with commandbars in Excel

    your workbook opens OK for me, but i can not test the included result, i will look, later, if i have a newer version of excel on any machine,

    the value of 90 i used earlier was the index of the...
  35. Replies
    2
    Views
    126

    Re: delete browser cache from code

    check out
    DeleteUrlCacheEntry API
  36. Re: Foreign Language issues with commandbars in Excel

    i tested initially using

    For Each cbBar In Application.CommandBars
    Debug.Print cbBar.Name, cbBar.Index
    Nextwhich gave me the index value of 90 for Built-in Menus
    this obviously...
  37. Replies
    4
    Views
    177

    Re: Error on Creating Excel File

    what is the content of m_var when the code runs?
  38. Re: Automatically send multiple emails with attachments

    what code are you using now to send the emails?
    in outlook, each attachment has to be added to the email
  39. Re: Foreign Language issues with commandbars in Excel

    check if the index of 90 is correct for the built-in menus for your version of excel
    msgbox zb.name

    it worked correctly when i tested

    do the names of controls change in different language...
  40. Re: Run Time error 13 type mismatch

    what is the typename of myitems(itemcount) when the error occurs?
    perhaps some other type has arrived in your folder that does not match any of the existing criteria, better to change to

    if not...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.