+ Reply to Thread
Results 1 to 5 of 5

execute macro from personal.xlsb and get the value of the variable

  1. #1
    Registered User
    Join Date
    12-19-2017
    Location
    Germany
    MS-Off Ver
    MS Office Professional plus 2010
    Posts
    17

    execute macro from personal.xlsb and get the value of the variable

    Hi All,

    I would like to call a macro from the personal.xlsb and receive the value (lr) from it, but I receive no value for the variable lr

    the Code that start the macro in personal.xlsb:

    Please Login or Register  to view this content.
    and the Code from personal.xlsb


    Please Login or Register  to view this content.
    Thanks for your support!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: execute macro from personal.xlsb and get the value of the variable

    Unless you have messed up your version of excel

    The personal workbook is open when excel is open. It is opened as hidden.

    The Macro in the personal workbook will not do what you expect.

    I think it should be:-

    Please Login or Register  to view this content.
    Once you have edited the macro

    type =get_boards(1) in any cell

    It will return the last row number in column A.

    type =get_boards(2) in any cell

    It will return the last row number in column B.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    12-19-2017
    Location
    Germany
    MS-Off Ver
    MS Office Professional plus 2010
    Posts
    17

    Re: execute macro from personal.xlsb and get the value of the variable

    Thank you but I Need the last Number back to my macro I think:

    run macro --> call an another macro from personal.xlsb and take the number of the last row --> go back to the start macro and use the number of last row for the next steps

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: execute macro from personal.xlsb and get the value of the variable

    Ahh You are using the Personal Macro as a subroutine.


    Public LR As Integer

    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.

    and the Code from personal.xlsb



    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-19-2017
    Location
    Germany
    MS-Off Ver
    MS Office Professional plus 2010
    Posts
    17

    Re: execute macro from personal.xlsb and get the value of the variable

    Thank you it works if you are in the same workbook to start from a separate wb not I can run the macro with

    Please Login or Register  to view this content.
    or with a Parameter

    Please Login or Register  to view this content.
    but I dont receive back the number of the last row, it is blank

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Why will this macro only run from PERSONAL.xlsb?
    By terrypin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-09-2018, 08:39 AM
  2. Trouble passing variable to Userform in Personal.xlsb
    By davepoth in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2015, 05:26 PM
  3. [SOLVED] Personal.XLSB macro pasting into Personal.XLSB
    By davepoth in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2015, 07:40 PM
  4. Running a Personal.XLSB Macro From Within Another Personal.XLSB Macro
    By js0873 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-23-2015, 09:58 AM
  5. Replies: 0
    Last Post: 01-15-2015, 05:53 AM
  6. [SOLVED] Copied personal.xlsb to another computer, macros won't execute
    By Rick K in forum Excel General
    Replies: 3
    Last Post: 10-27-2014, 10:19 AM
  7. cannot run macro if personal.xlsb is hidden
    By illusionek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2014, 08:16 AM

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