What causes scrolling to be disabled in an excel worksheet? - excel

I apologize because I feel like I am asking a silly question that I should know the answer to.
I'm wondering what I have done to make it so that one of my worksheets within a workbook does not allow me to scroll.
Some things that might be important
This worksheet contains command buttons. The command buttons are used to add rows to tables
One of the command buttons moves all the other command buttons to align them nicely
this worksheet contains tables
What I have tried and so no change
I tried duplicating the worksheet and deleting all the command buttons
In the duplicated worksheet I converted all tables to ranges
I made sure I didn't have frozen rows/columns
What I tried and maybe learned something?
I tried selecting all cells and pasting in another page, when I pasted with values I could scroll, when I pasted with sourse formatting I could not. This makes me think it is related to some formatting but I am not sure what specifically.

There're a list of items that could be going on...
Scroll lock could be on
You set .screenupdating=false
You are showing a userform that has mode
You have so much memory in use that Excel disabled its display, e.g., you can still debug.print in VBA, but the window doesn't scroll while in the instance (and you can save).
Those are some quick heavy hitters, but without having details about what is in your sheet (most of which probably can't be easily shared in a post), nothing can be said definitively.
As such, this is a subjective/speculative question as is and should be closed.

Related

activeX combo boxes

I have a complex workbook that has a number of ActiveX Combo boxes which I choose over form controls for their customization options. Inexplicably, ALL of the boxes stopped working this morning. Literally, one minute they worked and then stopped completely. I was not working on that sheet, but rather a different one. There is no code attached to the combo boxes. When in design mode, the properties box doesn't even come up. Developer>Properties opens the worksheet properties only. This problem is not associated with the workbook because older versions of the same sheet are acting the same way. However, the compiled version of the workbook works fine. This suggests corruption in Excel somehow, so I repaired Excel (Office 365). No difference.
I deleted the combo box and replaced it and it is ok now, but that's not good enough for me. I have many others to remove and replace, but why do I need to do this? There are 180 other boxes that this happened to in the past and I simply used Data Validation for because I could not have this happen. I distribute this workbook in a compiled version only, so if I was certain that this bizarre occurrence could not happened once its compiled, I will replace all of the boxes that don't work and replace all of the data validation boxes with activeX, and compile it immediately. But I like things to make sense. What the heck is going on?
An ActiveX combo box has it's code on the sheet module for the sheet it is in. So, it's not odd that looking for the properties of the combo box that the sheet module would pop up. When in design mode and you right click on the combo box a pop up menu should come up that allows you to click and see the box's code on the sheet module. Are you saying that all the code for the boxes vanished or you had never written it? How do they get populated? I apologize for commenting in the answer section but I don't have enough points yet to write in the comment section.
The fact that no one has answered this suggests that this is behavior that I am causing. My belief at this point is that there is code running in the background which suspends other activity. I have a pop up calendar that ends with a range selection. I believe that this is looping somehow.
I am going to replace the data validation boxes with more combo boxes throughout the sheet with the calendar code in mind.

Excel - Disabel ability to manually change sheets (but don't hide them)

Apologies if this is a really stupid question but I've not been able to find a solution.
I've got a main page on my Excel workbook with a number of filter options and some buttons linked to vba code. When clicking the button it takes you another tab with a load of data filtered appropritately. There is a button there that removes the filters and takes you back.
This all works fine but what I want to do is stop people being able to manually change sheets but clicking on the tabs at the bottom of the screen. So far the only method I've found is hiding them, but this obviously doesn't work as you then can't see that data.
You can disable the editing of the sheet tab names by turning them off on the excel options as mentioned in the comment above. The downside to this approach is the user won't be able to see what sheet they are on (which I find incredibly frustrating).
The better method in my mind is to set up an event listener for when the user changes the name of the tab. You can then send a pop up box that appears when the user attempts to change the tab name.

Data Validation Drop Down Box Arrow Disappearing

I have recently been having issues in one of my Excel sheets, I have created a data validation drop down box that refers to a list in an adjacent column (unhidden).
Until today when I clicked on the cell, the drop down arrow appeared but now it briefly flashes before disappearing again, if you click on the right of the cell it still lets you make the selection but other people will use this sheet so it's not really acceptable.
I have checked that the data validation 'In-cell drop down' box is ticked and I don't know where to go from there, has anyone else had this problem? (Google has not been very helpful).
Thank you
I had the same problem and found out that this issue was in my case only related to the speed of the Excel Sheet itself. I had various linked pictures in the workbook that made it very slow, resulting as well in the data validation arrow issue.
Removing the linked pictures would improve the performance and resolve the issue.
(Previously I could resolve it with a workaround by creating a macro in "ThisWorkbook" that goes on two sheets and selects the fields with data validation activated when the workbook is launched:
Sheet("1").Range("DataValidation1").Select
Sheet("2").Range("DataValidation2").Select
Strange enough, this was sufficient to solve the problem.)
I've never personally seen this but have you tried it on another computer or as another user on your computer? I think it just might be some temp files or cache from office that is causing this issue.

Altering Excel Font Rendering to Fit Content in Various Zoom Levels

You can easily fit the content of your cells by selecting a series of columns and double clicking with your cursor between two cells. However, if you zoom in or out the rendering of the cells changes and what had been autofit changes relative to the size of the cell and you end up with a #####.
Is there a way to autofit cells that will hold irrespective of the level of zoom?
This is probably more question for the software development team at Excel but perhaps a VBA band-aid fix could be implemented in the interim, if the problem is ever addressed.
Thanks!
Unfortunately the zoom level (by scrolling with the mousewheel) by default cannot be captured to trigger a VBA script.
The only solution seems to be to have a VBA subroutine running in the background constantly that stores the current zoomlevels and the sheet they apply to in a Public variable.
When that variable is different from the one currently observed from the application you need to activate Autofit for all the worksheet columns again.
Alternatively you could just store a single number (THE zoomlevel), then when you switch between sheets that have different zoomlevels the subroutine will immediately Autofit for the sheet you switch to.
Ofcourse you have to consider the intervals at which this is done.
Last alternative is to Autfit manually whenever you spot such occurence...
There is a menu button who does that automatically. For me it is in the Ribbon "Start", than "Rows" , than "Format" than one of the Columnwidth options.
Excuse the vague description, I am using a german version of Iffce.

Making use of selected or clicked cell without VBA

A tricky one, I assume. However, is there a way to make use of a selected or clicked cell in Excel somehow without the need for VBA?
(I know how to do it with VBA, but macros are macros, but if you want to give workbooks to people...)
For instance, I would like to make some of the content in the freezed section to be dependent on where in the sheet someone is. It would be optimal, if the selected cell/row would be trigger enough.
It would be also okay, if clicking a cell (e.g. a link navigating in the sheet) would trigger the conent to change. Hence, a solution would be to make a hyperlink change a value in some cell somewhere. I know, this is a different question, but it should be all accomplishing the same goal of the line on top ;-)
Thanks a lot!
You cannot change values or display of another cell with formula or functions.
The hyperlink will send you to another location but won't change the freezed part, except if you only freeze rows and the hyperlink send you to a further column. But you will have then to really think about your layout very precisely. Moreover, the user will even less understand what happens unless you can design a great UI (but Excel may not be the best tool though).
Some tips:
Use hyperlinks but on differents sheets
Use "transparent" macros (without big buttons but rather event vba as you pointed out)
Sorry i don't have a magical solution.

Resources