Search:

Type: Posts; User: Norie; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 1.48 seconds.

  1. Thread: Error handling

    by Norie
    Replies
    10
    Views
    163

    Re: Error handling

    You can replace it with whatever you want/need, that was only to show how it worked.
  2. Thread: Error handling

    by Norie
    Replies
    10
    Views
    163

    Re: Error handling

    What you can do is something like this.


    Dim Res As Variant

    ' other code
    Set Res = titleElem.getElementsByTagName("p")(0)

    If Not Res Is Nothing Then
    ...
  3. Thread: Error handling

    by Norie
    Replies
    10
    Views
    163

    Re: Error handling

    What happens in the code if 'Sorry...' isn't found?

    Do you get an error along the lines of 'Object not set...'?

    If you do then there's probably a better way to handle it than On Error. and Goto.
  4. Thread: Problem with VBA

    by Norie
    Replies
    5
    Views
    91

    Re: Problem with VBA

    Your code will exit here if any cell other than C23 has been changed.


    If Intersect(Target, Range("C23")) Is Nothing Then Exit Sub

    So the code to check the value of C9 is never reached.
    ...
  5. Thread: Error handling

    by Norie
    Replies
    10
    Views
    163

    Re: Error handling

    James

    What error are you trying to 'handle'?
  6. Replies
    4
    Views
    208

    Re: Maximum Size for a 2 dimensional array

    What problems were you actually having?

    I know there's a limit to how much data you can write back to a sheet in one go but I'm not sure that's a memory issue.

    When I've run into that problem...
  7. Replies
    4
    Views
    208

    Re: Maximum Size for a 2 dimensional array

    If you are using a dictionary why not store the values associated with each key in the dictionary in separate arrays?
  8. Re: Using Excel to close the correct word document

    Mark

    Create a reference to the document you are creating/opening and use that reference to close the document once you are finished with it, something like this.


    Dim wdApp As Word.Application...
  9. Re: Using Excel to close the correct word document

    Mark

    Are you using code to open the Word document that you want to work with and then subsequently close?
  10. Re: VBA Trying to Access file with biggest date

    Why not adjust the code so that when it is run on a Monday it subtracts 3 days instead of 1?


    If Weekday(Date, vbMonday) = 1 Then
    BD = CDate(Evaluate("WORKDAY(TODAY(),-3)"))
    Else
    BD =...
  11. Thread: Formula to right

    by Norie
    Replies
    3
    Views
    116

    Re: Formula to right

    Try this in AC2 and copy across.

    =INDEX($AA:$AA, COLUMNS($AC$2:AC2)+2)
  12. Re: using text in cell to form part of formula.

    Jay

    Why are you using INDIRECT, doesn't A2 on it's own work?

    What's actually in A2?
  13. Replies
    5
    Views
    110

    Re: VBA: Set column widths

    Do you mean like this?


    Dim ar As Variant
    Dim cnt As Long

    ar = Array(20,30,40)

    For cnt = LBound(ar) To UBound(ar)
    Columns(cnt+1).ColumnWidth = ar(cnt)
  14. Replies
    1
    Views
    83

    Re: Set Range Reference

    Try this.


    With ThisWorkbook.Sheets("Daily Totals")
    Set rng_column_Loop = .Range("G2", .Cells(2, .Columns.Count).End(xlToLeft))
    End With
  15. Re: Open new workbook, make active, perform save as

    Why are you creating another instance of Excel to open the workbook 'Table-TEST-formula.xlsx'?
  16. Replies
    29
    Views
    508

    Re: Loop each sheet between two sheets

    Is it only the visible sheets that have names starting with 'Vendor...' that you want to run the code on?
  17. Replies
    3
    Views
    89

    Re: XML Http request into Excel

    This worked for me.



    Private Function getprices(ByVal URL As String) As Variant


    Dim source As Object
    Dim http As New XMLHTTP60, html As New HTMLDocument
    Dim ret(1 To 1) As...
  18. Re: Unable to load .data file in excel using VBA

    So it's a text file?

    If that's the case you probably need to use Workbooks.OpenText rather than Workbooks.Open.
  19. Replies
    8
    Views
    182

    Re: Application-defined or object-defined error

    Have you checked the contents of the original array?
  20. Re: Unable to load .data file in excel using VBA

    Can you manually open a .data file from Excel?
  21. Re: Unable to load .data file in excel using VBA

    Can you post your code?
  22. Replies
    8
    Views
    182

    Re: Application-defined or object-defined error

    There is a limit to how much data you can transfer from an array to a sheet but if you go over that limit you wouldn't get the error you describe, you would end up with a bunch of #N/As on the...
  23. Replies
    8
    Views
    182

    Re: Application-defined or object-defined error

    Is there anything in the array that could be (mis) construed as a formula/reference?
  24. Replies
    5
    Views
    193

    Re: Print using a userform

    Do you have code for printing a PDF?
  25. Replies
    6
    Views
    119

    Re: Exporting & Importing Macro with VBA

    Why not create a workbook with all the required buttons/code etc. in it?

    Then when you create the new workbook use that as a template and copy the data from the user selected file to it.
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4