Text box that moves when scrolling

glad_ir

Board Regular
Joined
Nov 22, 2020
Messages
143
Office Version
  1. 2010
Platform
  1. Windows
Hello everybody,

I’m hoping for some help please. I’d like to achieve a text box or text in a row that centres on the screen as the user scrolls horizontally but moves with the row when they scroll vertically.
Is this even achievable? Any thoughts much appreciated.

thank you, Iain
 
Hi - thank you for your patience.....it is now working now I've fixed my incompetence (had left myself in design mode)!! I have done some very basic VBA coding but nothing of this complexity. I'm discovering ActiveX controls for the first time.....lots to learn. Thank you very much for your help. I really appreciate it :)
Hi - I am not going to tick the solution found check box as really hoping for a scroll solution where the textbox stays in the same row but thanks again for your help and patience.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi - thank you for your patience.....it is now working now I've fixed my incompetence (had left myself in design mode)!! I have done some very basic VBA coding but nothing of this complexity. I'm discovering ActiveX controls for the first time.....lots to learn. Thank you very much for your help. I really appreciate it :)
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.
 
Upvote 0
Not sure why you want the Texbox seen at all times.
But would a Userform work for you.
A Userform can be seen at all times in the center of the screen with Text on the Userform.
Would something like this work?
Do you know what a UserForm is?
What do you use the Textbox for?
And you can still work on your sheet with the userform visible
 
Upvote 0
Hi, I've not used a userforms before.
I'll try to explain what I'm trying to achieve.....I have a sheet which contains a number of series of objects. Series 1 contains objects and formula in cells C5 to FG15 with the title for the series in cell C5. As the user scrolls right they lose the title. I'd like the title for the series to be visible in row 5 as the user scrolls. I have considered putting the title on a frozen pane to the left by some of the titles are big and I don't want a large frozen pane taking up space. I may be asking too much here?
 
Upvote 0
Hi, I've not used a userforms before.
I'll try to explain what I'm trying to achieve.....I have a sheet which contains a number of series of objects. Series 1 contains objects and formula in cells C5 to FG15 with the title for the series in cell C5. As the user scrolls right they lose the title. I'd like the title for the series to be visible in row 5 as the user scrolls. I have considered putting the title on a frozen pane to the left by some of the titles are big and I don't want a large frozen pane taking up space. I may be asking too much here?
Is there a way in the formula you sent previously of moving the message box horizontally based on where the user selects cells but fixing it's horizontal position.....i.e. getting it to move left and right but not up and down? that could work. Thanks
 
Upvote 0
Try this:
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Modified  11/24/2020  3:05:59 AM  EST

    TextBox1.Top = ActiveCell.Top
    TextBox1.Left = ActiveCell.Offset(, 2).Left
    
End Sub
 
Upvote 0
Lets try this we need to keep TextBox to Right of active cell so it does not get hidden as you go to the right
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Modified  11/24/2020  3:16:31 AM  EST
If ActiveCell.Column > 3 Then TextBox1.Top = ActiveCell.Top
 If ActiveCell.Column > 3 Then TextBox1.Left = ActiveCell.Offset(, -2).Left
TextBox1.Value = Range("C5").Value
End Sub
 
Upvote 0
Lets try this we need to keep TextBox to Right of active cell so it does not get hidden as you go to the right
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Modified  11/24/2020  3:16:31 AM  EST
If ActiveCell.Column > 3 Then TextBox1.Top = ActiveCell.Top
If ActiveCell.Column > 3 Then TextBox1.Left = ActiveCell.Offset(, -2).Left
TextBox1.Value = Range("C5").Value
End Sub
Hi - thank you for this. This is keeping the box to the left of the cursor as you say. Is there any way to keep the Text box in say row 5 but directly above the cell selected by the user in the range C5:FG15? e.g. if the user selects any cell between C6 and C15 the Text box will move to cell C5, then if they select anywhere between H6 and H15 the Text box will move to H5 etc?
 
Upvote 0
Hi, yes each series is shallow and wide. Many of the rows are auto hidden based on user inputs but it’s still pretty wide and the title, whether on the left, right or in the middle gets left behind with the inevitable horizontal scrolling.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

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