+ Reply to Thread
Results 1 to 7 of 7

Using Personal.xls as a worksheet template holder.

  1. #1
    Registered User
    Join Date
    01-23-2012
    Location
    Orlando FL
    MS-Off Ver
    Excel 2003
    Posts
    7

    Talking Using Personal.xls as a worksheet template holder.

    Hi all!

    Newbie here and love learning new vba tricks and grasping new concepts.

    I have a problem and it's the one thing that is preventing me from crossing the finish line. Have coworkers who are not pc savy and I am trying to minimize the amount of un needed data that they will have to send over their wireless mobile network cards. They work with customers on remote sites and we use excel to process all of our paperwork/forms. I know this is not the best solution, but I am making the best of a mediocre situation.

    I have my personal.xls workbook with all the required macros and scripting to create a custom toolbar for them (idiot proof..i mean user friendly) to handle things that I do not want to have to repeat over and over. The personal .xls also has worksheets preformated and coded to mesh well with the workbooks that they are currently working with. I need to be able to copy sheets from the personal.xls workbook to a unknown named workbook (the workbook exists, but the filenames are never going to be the same and I want these to work with older versions of our paperwork). My code is as follows, but I need where it references "2012 Workbooks.xls" to be the current workbook. The code works perfectly with my workbooks named Personal.xls and 2012 Workbooks.xls. Just when I throw the variable workbook name it will fail...of course.
    Please Login or Register  to view this content.
    So in the end, they can add forms as needed therefore only sending in necessary forms.
    Thank you in advance. I am sure the solution is easy, it is just escaping me at the moment.
    Last edited by klatuvarata; 01-24-2012 at 09:15 AM. Reason: Fixed some typos and added the CODE Tags

  2. #2
    Registered User
    Join Date
    01-23-2012
    Location
    Orlando FL
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Using Personal.xls as a worksheet template holder.

    Bump no response.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Using Personal.xls as a worksheet template holder.

    Please Login or Register  to view this content.



  4. #4
    Registered User
    Join Date
    01-23-2012
    Location
    Orlando FL
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Using Personal.xls as a worksheet template holder.

    Definition of irony: I bumped my post and continued to search to find the answer and wehn I found the answer and moified my code, tested it and it worked, I get another solution. :P Thank you for your response and I do appreciate the assitance.

    Here is my version. My whole problem was with how I was referencing the workbooks so I read and learned to use Thisworkbook and ActiveWorkbook while eliminating the visible invisible "unnescessary" code.

    Please Login or Register  to view this content.


    Thank you again!

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Using Personal.xls as a worksheet template holder.

    You'd better reference the workbook and the sheet for the replacement to prevent unpredictable results.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-23-2012
    Location
    Orlando FL
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Using Personal.xls as a worksheet template holder.

    Ok, pardon my lack of comprehension here.
    First let me make sure that I have my goal stated correctly. My initial workbook has only three tabs/worksheets (necessary items for all jobs: Repair Order, Daily Story Sheet and Scanned Documents). The rest of the optional tabs/worksheets all reside in the hidden personal.xls file which is on the local machine(reduces file send size). When the user clicks a custom button on a custom toolbar, the script copys the hidden tab into a specific location in the active workbook; i.e I just went from 3 worksheets to 4 worksheets in my workbook. Any repeat adds will be subsequently labelled incrementally; i.e. "Daily Story Sheet (2)".

    So this copies from the personal.xls to the active workbook at the end of the worksheet tabs?
    Please Login or Register  to view this content.
    And this is reformatting an existing worksheet with values in the personalxls file?
    Please Login or Register  to view this content.
    Last edited by klatuvarata; 01-24-2012 at 02:39 PM. Reason: typos

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Using Personal.xls as a worksheet template holder.

    Copy from personal.xls to activeworkbook:

    Please Login or Register  to view this content.

+ Reply to Thread

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