+ Reply to Thread
Results 1 to 5 of 5

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

Hybrid View

  1. #1
    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

    Sub test()
    
    get_boards(LR)
    
    End Sub
    Or

    Sub test()
    
    Call get_boards(LR)
    
    End Sub

    and the Code from personal.xlsb



    Public Sub get_boards() 
    
    LR=Cells(Rows.Count, 1).End(xlUp).Row
    
    End Sub
    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.

  2. #2
    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

    Application.Run "'C:\Users\Q36804\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.xlsb'!get_boards"
    or with a Parameter

    Application.Run "'C:\Users\Q36804\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.xlsb'!get_boards", lr
    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