+ Reply to Thread
Results 1 to 13 of 13

DIM and SET how to ?

  1. #1
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    DIM and SET how to ?

    Hi

    i need help
    i need to have a macro that will allow me to copy/create formulas
    between two work books

    the work book where the button containing the macro is placed will all ways have a different name. when the button is pushed it will open a book that will all ways have the same name and then copy info from it and the past it in the work where the macro button is

    i know how to make the macro but its the set and the dim that i cannot get right pleas help
    thank you
    wade
    WADE

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: DIM and SET how to ?

    something like
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    Re: DIM and SET how to ?

    must this be a sub all on its own or can i add to it like this


    Please Login or Register  to view this content.


    and it not working when i dothis
    Last edited by Wade LEES; 09-12-2009 at 08:58 AM.

  4. #4
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Re: DIM and SET how to ?

    Wade LEES,

    Kindly modify your earlier post by writing the code in Code Tags so that it is easy to read. Refer Rule 3 of Forum Rules.

    Thanks.

    --Karan--

  5. #5
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    Re: DIM and SET how to ?

    Sorry is that better

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: DIM and SET how to ?

    Please change the QUOTE tags to CODE tags.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    Re: DIM and SET how to ?

    ok sorry about that i have changed and now know how to do use the code tags sorry once again

    any ideas on my problem

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: DIM and SET how to ?

    I don't know what you're trying to do.

  9. #9
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    Re: DIM and SET how to ?

    OK so the workbook that has the code below is found in a workbook that is called BULK120909 now but it will have many different names so the code i am trying to use below needs to understand that it must all ways return the info from the workbook that it opens back to the BULK120909 but as i said the BULK120909 will be called BULK150909 next week and so that means that if the macro records it as BULK120909 then when the name of the book changes the macro will no longer work and so i asked here and if you look above you will see the ROY gave me an answer which i adapted to my code but it is not working


    Please Login or Register  to view this content.


    please pleas pleas

    thank you Wade
    Last edited by Wade LEES; 09-12-2009 at 09:37 AM.

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: DIM and SET how to ?

    You said you had the basic code, but I don't believe you have. Much better to say what you want to do. As it is it's hard to folow what you are attempting. You need to specify sheets to work with.

    You can't use the variable in the formula like that

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: DIM and SET how to ?

    Maybe like this, but just guessing.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    08-23-2008
    Location
    Maputo
    Posts
    38

    Re: DIM and SET how to ?

    Ok ROY

    Here it is

    in my work book called bulk120909 i have placed a button i need to attach a macro to.

    the marco must when the button is pushed open a work book called
    Mimmos Issue Sheets MONDAY.xls.xls
    which is found in my C:\ drive and i have put this path in my workbook (bulk120909) on a sheet called BULK SHEETS in H2

    it must then go to bulk120909 BULK SHEET I331 and insert a formula that will take the figer it findes in Mimmos Issue Sheets MONDAY.xls.xls on PIZZA SHEET 4p and sum that with the figer it findes on Mimmos Issue Sheets MONDAY.xls.xls PASTA SHEET P4 and then return the value to bulk120909 BULK SHEET I331


    i need it to do this for about 2000 different entry's this is just one
    it is basically taking numbers it finds on the other work book and placing their sum totals in the bulk120909 but as i said the bulk120909 will have a different name from week to week


    here is the original code i made

    Please Login or Register  to view this content.

    thank you
    Wade

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: DIM and SET how to ?

    Have you looked at Shg's suggestion?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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