+ Reply to Thread
Page 7 of 7 FirstFirst ... 5 6 7
Results 91 to 98 of 98

Create code to recreate ActiveSheet contents at run-time

  1. #91
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Re: Create code to recreate ActiveSheet contents at run-time

    Quote Originally Posted by Norie View Post
    I don't have a My Documents folder.
    Unusual. Well what do you get if you type this into the immediate window?
    Please Login or Register  to view this content.
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level
    One year calendar in UserForm

    *******************************************************

  2. #92
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Re: Advanced VBA-Use IDE to examine sheet and work out code to dynamically create

    Cell Alignments

  3. #93
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    18,926

    Re: Create code to recreate ActiveSheet contents at run-time

    Why do you want to know that?
    If posting code please use code tags, see here.

  4. #94
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Macro Unrecorder

    Quote Originally Posted by Norie View Post
    Why do you want to know that?
    Because that is where the code is saving the text file output. If you search that location after running the code, it should be there?

    (The default file path is usually the My Documents folder so it is simpler to tell non-technical end users to look in My Documents)

  5. #95
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Macro Unrecorder

    I'm making progress. But encountering lots of problems.

    PROBLEMS
    • borders patchy - some borders are being missed by code. why?
    • cell format alignment = impossible? (unless design loop to expand to new range each time?)
    • print area is being detected as valid worksheet name
    • cell styles picking up custom cell styles e.g. Normal 2 (could ask end user to run macro to erase non-custom styles before start?)(I don't need custom styles for my current projects)


    TO DO
    • font color
    • font size
    • set print range
    • cell colors/shading
    Attached Files Attached Files
    Last edited by mc84excel; 03-10-2014 at 09:41 PM.

  6. #96
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Re: Create code to recreate ActiveSheet contents at run-time

    Quote Originally Posted by Norie View Post
    I don't have a My Documents folder.
    You can edit the line
    Please Login or Register  to view this content.
    to whatever folder path you want.

  7. #97
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Cool Macro Unrecorder

    Finally. I loathe crunchtimes.

    I have achieved ~ over 95% of what I wanted to.

    If you run the macro in the attached and then run the output .bas, you should get a sheet that is very close to the original.

    (Most of the following is noted in the Main module):
    The code does make some assumptions on how the worksheet was designed and it also (deliberately) skips most changes made to a range which has an inbuilt Style applied.
    The code won't work if the original sheet is protected or has custom Styles applied. (A macro is included to delete all custom Styles).


    There is a large number of things that it doesn't do - either because I had no need for it and/or because I consider it impossible. A non-exhaustive list of these below:
    • Font Name (didn't need)(Could be easily added)
    • Font strikethrough (didn't need)(Could be easily added)
    • Cell Patterns (didn't need)(Could be easily added)
    • Page SetUp margins (didn't need)(Could be easily added)
    • Conditional formatting (would like but impossible?)
    • Controls/Shapes/Pictures (would like but impossible?)
    • Array formulas (didn't need + impossible?)
    • Tables (didn't need + impossible?)
    • Filters (didn't need + impossible?)
    • Charts (didn't need + impossible?)
    • SparkLines (didn't need + impossible?)


    I will note the bugs in the next post...
    Attached Files Attached Files

  8. #98
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In the Doldrums
    MS-Off Ver
    2010 32bit
    Posts
    1,680

    Macro Unrecorder

    Further to the previous post...

    Below are the bugs/things that need improving before I can mark the thread solved.

    1. There is an unusual bug with the borders. If you compare the output sheet with the original test sheet, you will note that the last two lines of the form are missing a border between them. If it was a problem with the loop code then why are only borders affected? [UPDATE: SOLVED]


    2. My cell loop code is very badly written. I have rewritten these loops at least 3 times now and am still unhappy with them.

    3. Further to problem 2 - I loathe my functions for determining whether range is part of an existing range. These need rewriting but I don't like every alternative version I produce of these. Anybody want to try?


    UPDATE: Found a bug in the Unrecorder_Start procedure.
    Please Login or Register  to view this content.
    Both uses of True need to be changed to False.
    Last edited by mc84excel; 03-23-2014 at 06:53 PM.

+ Reply to Thread
Page 7 of 7 FirstFirst ... 5 6 7

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1