Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Placing an Autofiltered range inside an array works only once

    I've found that the above method does not work when the filtered range is non-contigous. I know one method around this is to load the address of the returned range as a string into an array and loop...
  2. Re: Placing an Autofiltered range inside an array works only once

    Solved with the solution found here. Sorry for the inconvenience.
    https://www.mrexcel.com/forum/excel-questions/602628-macro-transfer-visible-range-autofilter-array.html
  3. Placing an Autofiltered range inside an array works only once

    I'm currently having a problem where an auto-filtered range is only placed inside an array on the first loop but subsequent attempts to do the same despite the range filtering correctly don't work....
  4. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    Can you provide a link to the workbook ? Also can you provide what the output should be ? The macro works perfectly on my end.
  5. Replies
    3
    Views
    66

    Re: how does mod work with negative numbers?

    You have written 4 mod -13. When integer 4 is divided by integer -13, 4 is divided once with a remainder of -9.
  6. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    Name_K is fine as I explained before.
    If this one doesn't work then I'm stumped. Have you looked over the links I shared?


    Sub Custom_Sort()
    Dim Name_K As Variant, WK As Worksheet, X As Long
    ...
  7. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    Now try changing sortNum to variant at the top.
  8. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    At the end of a for loop the variable will always be one more than intended.
    We can use the letters, but one of your original requests was to shorten the code so I used the CHR() function along...
  9. Replies
    9
    Views
    156

    Re: Macro help - Tab name changes daily

    You can use the codename of the worksheet
    EX: sheet33.range("X1")=
    Ex: sheet33.name=
  10. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    I assume you are getting the subscript out of range error for the trim function after you have reached the Case 68 line. In which case it is because I reused the same variable since that section of...
  11. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    Let's try using a variant array instead of a string array then


    Sub Custom_Sort()
    Dim Name_K As Variant, WK As Worksheet, X As Long, sortNum As Long




    Name_K = Split("Broker's Invoice;...
  12. Replies
    7
    Views
    125

    Re: Navigating to Worksheet

    Sub GoToSheet()
    D=thisworkbook.worksheets("Switchboard").range("E1").VALUE
    thisworkbook.worksheets("Week " & D).activate
    end sub
  13. Re: Find and Replace VBA script for a range with exact match with quotes

    Sub Replace()Dim FindN_Replace_Array() As Variant, X As Long, element As Variant, Column_B() As Variant, T As Long, Y As Long, _
    Column_B_C As Variant, Item As Variant, New_String As String,...
  14. SendKeys to unlock a VBA Project placing password inside an already unlocked project module

    I'm using the following macro to unlock my VBA projects when the workbook is opened. However if I already have another vba project unlocked, this macro will sometimes just place the password inside ...
  15. Re: Copy and Paste routine in VBA with two arrays

    Try something like this



    Sub LOOP9()


    Dim B As Variant
    Dim D As Variant
    Dim WB1 As Workbook, WB2 As Workbook, element As Long
  16. Re: Copy and Paste routine in VBA with two arrays

    Inside your second loop which sheet is the data being taken from or is there only 1 worksheet in the specified workbook?
    Windows(B & ".xls").Activate
    Range("A2:B2").Select
    Selection.Copy
  17. Replies
    3
    Views
    109

    Re: Macro Keybinds in different workbooks.

    Would my macro names have to be unique in each workbook?
  18. Replies
    3
    Views
    109

    Macro Keybinds in different workbooks.

    Is it possible to use the same macro keybind in different workbooks but have only the code tied to the current workbook run?
  19. Replies
    7
    Views
    140

    Re: Infinite save prompt loop on close

    Working now!! Thank you.
  20. Replies
    7
    Views
    140

    Re: Infinite save prompt loop on close

    Still an infinite loop for me. I also tried adding a Thisworkbook.saved=True to my afterSave event as well
  21. Replies
    7
    Views
    140

    Re: Infinite save prompt loop on close

    No I don't.
  22. Replies
    7
    Views
    140

    Infinite save prompt loop on close

    I'm using the following macro to suppress messages about there being things within the workbook that the document inspector can't remove. It works but when closing the file it enters an infinite loop...
  23. Replies
    40
    Views
    1,204

    Re: Custom Sort - problem with a comma in an entry

    I delimited the string with a semicolon. Any spaces not in-between two letters are removed automatically. Check the string for proper spacing atthe top so it matches with your columns.

    Sub...
  24. Re: Sort a Series of Dates and Add A Value at End for Repeated Values

    Try this


    Sub Append_Number()


    Dim AR As Variant, Date_Dictionary As New Dictionary, X As Long, J As Long, FoundCell As Range


    Set Date_Dictionary = CreateObject("Scripting.Dictionary")
  25. Re: Sort a Series of Dates and Add A Value at End for Repeated Values

    Does Files_Tab_LR represent a number or a string? Would going to the last used row in column J works instead?
Results 1 to 25 of 137
Page 1 of 6 1 2 3 4