Create a Floating Key/Legend

GhostBroker

New Member
Joined
Jul 13, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello Forum Members,
I'm trying to create a floating key/legend for a spreadsheet. At present, the key exists in cells T1:T10. Panes are frozen from rows 1:7. The floating key will free up a lot of visual real estate, and show the user how to decipher the colors of cells. So basically, I need the key to float even as the spreadsheet is scrolled. I also need the user to be able to move the floating key to different positions on the screen, in the event that the key is covering needed information. The floating key does not need to be able to update, just to show the colors and their meanings. I've done some online research, and it seems like other users are doing things that are more complex than this, but I haven't found this particular solution.

Any advice/direction is appreciated.
Thank you.

Very Respectfully,

GhostBroker
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You could create a userform in the VBA editor, add the information that you want on the floating window, then add a bit of code that would launch the userform when the workbook is opened or when the user selects the page that you want it on.
 
Upvote 0
Paste in ThisWorkbook :

VBA Code:
Option Explicit

Private Sub Workbook_Open()
    UserForm1.Show
End Sub

Create a UserForm and paste this in the form's code window :


Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    If CloseMode = 0 Then Cancel = True
End Sub
 
Upvote 0
Solution
Thank you team. Please forgive my lack of experience, but...
I've gotten to the UserForm part (see attachment 1) how do I attach the Key (see attachment 2) to this UserForm?
 

Attachments

  • Userform.PNG
    Userform.PNG
    29 KB · Views: 27
  • Key.PNG
    Key.PNG
    2.9 KB · Views: 27
Upvote 0
When you open the userform in the VBA editor it should bring up a toolbox. If not, you can make it visible under the view menu. Then you can just add labels to it and make the labels match the text and colors in your image.

You will want to bring up the properties of the userform as well and change the ShowModal property to false to allow the user to scroll through the worksheet while the form is visible.
 
Upvote 0
Logit & lrobbo,

Thank you guiding me through this one!

You guys are great!

Very Respectfully,

GhostBroker
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,060
Latest member
mtsheetz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top