Results 1 to 10 of 20

Thread: Just testing a before a possible Thread post. No reply needed

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10

    Test

    Example
    Post #3 Copy table contents to VBE module

    The idea of these codes are to allow for a temporary storage of spreadsheet values to a code module.
    _ One code will add a table of values to the end of a code module, and an extra start and end line will be added which contains range and date info. This code uses the selected range. So a range must be selected before running this code.
    and
    _ a second code can be used to paste those values back to the same range.
    Optionally a date of entry can be given to search for, otherwise all table values are pasted in

    The codes are somewhat detailed and inefficient. They work in many places “line by line”. There are some more simpler and more efficient codes here. http://www.eileenslounge.com/viewtop...=31395#p243002

    Sub PubProliferous_Let_RngAsString__()
    This code puts a selected range of values into the code module in which the code at the position of just after this coding. The table data values will be added to ( or taken from in following codes ) the module in which the code is run.
    Here a brief walk through the code. There are more details in the 'comments
    Rem 0 Sets for convenience, a variable to the code module in which the code is placed/ run from
    Rem 1
    A code module used for storing a table will be given the extension to its code name of "_txt" No special reason for doing this, I just thought it might be useful for later reference to know that the code module is being used in such a way. ( If no more table data is in the code module, then the extension , "_txt" , will be removed. This will be done , for example in following codes after the data is removed.)
    Rem 2
    Before running the code, a spreadsheet range should be selected. The range is copied to the clipboard, and the text of that put in a string variable, strIn
    Rem 3
    The string format is changes slightly to allow better display in this code ( and to aid in manipulation in the codes which re copy the data back to the spreadsheet, http://www.eileenslounge.com/viewtop...=31395#p242941
    Rem 4
    This adds an “extra line” to the start of the string with range information and current date, and an extra line at the end of the string with the same date. (I use date format of 10 digits as DD MM YYYY. ( This needs to be added to the data retrieving codes if looking for data from a specific date ) )
    As demo example, say I copied a 2 row x 2 cell range, B2:C3 to the clipboard. Say the range looked like this
    A B
    C D
    At this point in the routine, after Rem 4 , I will have in strIn , something of this approximate/pseudo form, ( say for a date of 12th December, 2018 ):
    Code:
    = " '_-20 12 2018 Worksheets("Tabelle2").Range("B2:C3") "  & vbCr & vbLf &  “|” &  “A”  &  “|” & “B” & vbCr & vbLf & “|” &  “C”  &  “|” & “D” & vbCr & vbLf &  “  '_-20 12 2018 “
    Rem 5
    The above string is converted to an array by splitting by the & vbCr & vbLf & . So effectively , I would end up with something of this form , for the above example , a 4 element, 1 Dimensional array:
    { SpltRws(0) , SpltRws(1) , SpltRws(2) , SpltRws(3) }
    where
    SpltRws(0) = " '_-20 12 2018 Worksheets("Tabelle2").Range("B2:C3") "
    SpltRws(1) = “|” & “A” & “|” & “B”
    SpltRws(2) = “|” & “C” & “|” & “D”
    SpltRws(3) = “ '_-20 12 2018 “



    Alan
    Last edited by DocAElstein; 12-21-2018 at 07:37 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 192
    Last Post: 08-30-2025, 01:34 AM
  2. Vlookup help needed
    By AbuReem in forum Excel Help
    Replies: 15
    Last Post: 11-12-2013, 11:32 AM
  3. TESTING Column Letter test Sort Last Row
    By alansidman in forum Test Area
    Replies: 0
    Last Post: 10-24-2013, 07:14 PM
  4. formulas needed please
    By paul_pearson in forum Excel Help
    Replies: 5
    Last Post: 03-21-2013, 04:43 PM
  5. Feed / Post Data on Web Page Using VBA
    By in.vaibhav in forum Excel Help
    Replies: 10
    Last Post: 01-10-2013, 05:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •