Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:38:39+00:00 2026-06-03T19:38:39+00:00

I currently have data that I am splitting into multiple sheets and allowing the

  • 0

I currently have data that I am splitting into multiple sheets and allowing the user to select which sheet they run the macro on. The work sheet is used as a filtration between multiple systems

I have a named range (dayList) that groups the data into days, and creates a new sheet for each day (day1, day2, etc). Each sheet must then have another macro applied (screen data) that will filter the data in each of these sheets in exactly the same way.

I am trying to create a UI that will approximate the user being able to click on one of the cells in the named range to run the macro for that particular day. The code snippet im currently working with is below.

 Sheets("LaunchScreen").Activate
    Cells(rowCounter, 6).Value = "Day" & dayCounter
    ActiveSheet.Buttons.Add(538.5, 56.25, 48.75, 13.5).Name = "Day" & dayCounter
    ActiveSheet.Buttons("Day" & dayCounter).Select
    Selection.OnAction = "JoinTransactionAndFMMS"

Im looping this to create a new button for each day then pass the button name to another macro as a parameter to find the worksheet in this workbook that shares the same name.

TLDR: I need to:

  1. Set the location of a button using VBA, preferably matching location to a cell reference e.g.
    Range("A1").Button.Insert
  2. Pass a cell reference from a named range into a macro

An excel noob in way over his head here. Any help would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:38:40+00:00Added an answer on June 3, 2026 at 7:38 pm

    1) The .Add method expects 4 parameters. The first two are TOP and LEFT positions to get the UPPER LEFT corner of the button, the 3rd and 4th are height and width settings for the button.

    So, if you know you want to add a button and the reference is to position it at cell C10 (a better example than A1), then this would do it:

    ActiveSheet.Buttons.Add(Range("C10").Top, Range("C10").Left, 48.75, 13.5).Name = "Day" & dayCounter     
    

    2) Your macro has to first be designed to accept a parameter being “passed” into it. So, something like

    Sub MyMacro(MyRange As Range)
        MsgBox MyRange.Address
    End Sub
    

    Now, your other macro can call MyMacro and you must pass in the parameter as it is called:

    Sub test2()
       Call MyMacro(Range("Animals"))
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have multiple queries that query data from a few tables linked through
I have a website that needs to store two sets of user data into
We have our own data streaming algorithm that include some metadata+records+fields values. Currently we
I have a database that contains data for many clients. Currently, we insert tens
In the data structures class that I am currently taking, we have been tasked
I currently have a listing of data that has a randomly generated order listing.
I currently have an iPhone app that reads data from an external XML file
I currently have some code that delibratly throws an exception if the user sends
I am converting an old dataset into a newly structured database. Currently they have
I currently have a Combo box that has data that is bind from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.