Enable Mouse's Right Button Menue & WS Editing While Userform Running
Dec 5, 2009
I have a User Form which i want to use in such a way that editing the worksheet directly is not disabled while the userform is running. I would also like to use the right button mouse menu(cut, cpy,paste) while i am using the user form. I am using two Monitors with my PC and i want to work with User Form on one monitor being able to edit worksheet without having to close my User Form.
In reference to my other topci here: Userform Error
In this workbook I have successfully made it act like a userform calculator, the user does not ever see the actual sheets in the workbook, their only interface is the Userform calculator I created.
This is exactly how I want it, they do not need to see the sheets, nor do I want them to.
This leads me only to my next problem... Some of the users obviously wont have Macros automatically enabled, what I am wondering is, is there a way to put the normal "Enable Macros" button which appears along the top of a macro containing workbook when opened, I want to put this button into a userform like display without showing the workbook at all.
So here the process I envision:
1. User double clicks the file 2. It opens and automatically goes invisable (like it does already) 3. If the user does not have macro enabled, a userform like box appears and says "Please enable Marcros to user" with a button below for "Enable" and "Exit" 4. If exit is pressed excel closes 5. If enabled is pressed Macros are enabled and then they will automatically see my calculator userform like normal.
As you see, at no point do I want them to see excel or a workbook, just userforms so its not like they are using excel at all.
I have searched around the net and found a few ideas to tackle this, mainly one that has a "Prompt" workbook that shows when macros are disabled, but that is not ideal for me. However perhaps I could just edit this "prompt" code thing for my situation?
Here is the prompt sheet code I talked about:
Code: Option Explicit Private Sub Workbook_Open() With Application
[Code]....
How to use:
Open an Excel workbook Select Tools/Macro/Visual Basic Editor in the VBE window, select View/Project ExplorerSelect the This Workbook module Copy and paste the code above into this ModuleNow select File/Close and Return To Microsoft Excel Don't forget to save your changes...
I have a spreadsheet sent in an email. When I open it there is a warning bar saying
"Protected View This file originated from an Internet location and might be unsafe. Click for more details." then a button with Enable Editing.
I click the button and can edit the spreadsheet and save my changes. But the next time I open the file I get the same warning again. What is the way to designate that this spreadsheet is safe and prevent the warning recurring whenever I open the file?
I've created a userform following the tutorial http://msdn.microsoft.com/en-us/library/aa192538.aspx And a Find button which reads a string from a textbox, searches for it on the worksheet, and then displays the data for that row in the userform. I'm trying to work out how to do "Find Next", and it seems complicated. I know there are other techniques, such as filtering, or displaying all the found data in a dialog for user to choose which one to edit. But these are not suitable for my project. Here's the code for my Find button
So I have a Workbook that I want to make read-only/protect after a certain date. I also want to force the user to have macros enabled. So far I have the following script, but despite changing it to read-only it doesn't seem to do anything. I have also tried to enable protection on the sheets after that date, but am getting errors.
Public Sub Workbook_Open() PromotionOrNewHireForm.Show Sheet1.Select End Sub
...which works, but I would prefer to have the form hide (or unload, exit, etc.) once the toggle button in that userform is first selected. I've tried a few things but none of them have worked. BTW, the userform has two toggle buttons, which run the following:
Private Sub ToggleButton1_Click() Worksheets("Sheet1").Range("A4").Value = "Promotion" End Sub Private Sub ToggleButton2_Click() Worksheets("Sheet1").Range("A4").Value = "New Hire" End Sub
Also, once it closes, I'd like it to move on to the next macro depending on whether "Promotion" or "New Hire" is selected. Not sure if a workbook_change event is the best way to handle that.
I have a cell (B1) in the second Sheet. It contains two sentences of text, which will be spoken when entering that Sheet (by a click in the previous Sheet).
Code: Sub ButStart_Click() Sheets(2).Select Range("B1").Speak End Sub
When the Speak command is running no other user interaction can be made. As the text is quite long not all the users want to wait until it is finished. So I need the users to be able to click on the "Next" button which takes them to the next Sheet (and start speaking the text there).
I'm designing a custom toolbar in VBA and have managed to create a toolbar with buttons.
However, I've been battling away trying to edit the buttons images so that I can design the button image to match the nature of macro assigned to it. The problem is that if you record yourself doing it, the macro written in VBA doesn't seem to recognise the editing button actions.
Does anyone out there know of a way to custom edit a button image in VBA?
I've created several buttons that link to macros that I have put in the first row of my sheet. I've freezed the panes so they won't move so you can see the buttons form wherever you are so you can use them. However, I'd like to describe what the buttons do somewhere so it's easy for users to use them...
I was thinking the easiest way to do this would be when you hover over the button it shows text in a a little pop up window...like if you hover over an image sometimes there is text that appears.
Is there VBA code that I can write to make that happen? How would I then tie it to a button? To create the buttons under developer I just did Insert, Form Control, Button...
The user form consists of 2 pages. The second page can only be accessed from a control button on the first page (much like the next button on a wizard). I have disabled this button. I have 4 check boxes on the page and want the button to be enabled when any one of these is checked.
I managed to figure out the code for enabling the button any one box is checked:
I am trying to enable a command button on opening the Workbook, However it dosent work. I have placed the command button on the worksheet. Programatically it gets disabled on clicking it once. So i want it to be reactivated on reopening the Workbook.
Examples: This is the userform with the 'No Answer' boxes added into the user interface but not added to the code - this one doesn't crash excel: [url]
and this is the userform with the 'No Answer' boxes added into the code - this one will crash excel (but only when you open it directly from excel, it doesn't crash it if you test it out from vb): [url]
I don't have any problem regrading the project but my Problem starts when i tried to make my tool more user friendly
i tried to put comments on conditional cells in form of images but i also want to put these Image POPUPS on buttone also what i desired is when ever mose arrow hover over a button a image pop should appear.
I have a workbook that contains 18 sheets, on 14 of the work sheets I have a comand button that runs the following Private Sub CommandButton1_Click() ' Range("B3:B53").Select ' Selection.ClearContents
Dim nloop As Long
Range("C3:K53").Select Selection.Copy
Range("B3:J53").Select ActiveSheet.Paste
For nloop = 3 To 53
If nloop 3 And nloop 12 And nloop 15 And nloop 16 And nloop 23 And nloop 28 And nloop 41 And nloop 47 Then Range("K" & nloop).Value = 0
Next nloop
Range("B2").Value = DateAdd("d", 7, Range("B2").Value) Range("L7").Select End Sub I want to put a comand button on sheet18 that will run the code so it does the same thing as pressing each command button on each sheet.
the sheets that I have the cmd on are: Sheet1, Sheet2, Sheets3, Sheet4, Sheet5, Sheet6, Sheet9, Sheet10, Sheet11, Sheet12, Sheet13, Sheet15, Sheet16, Sheet17
I have a fairly straightforward UserForm with 4 listboxes and 4 option textboxes (the textboxes do not need to be a part of the validation I'm needing). I then have a command button that I want to be enabled ONLY if ANY of the 4 Listboxes have a selection. I've tried the "Change" event code below and it works upon the first selection of any listbox item.
However, if the user de-selects all selections in the listboxes (i.e. they are all unchecked), the command button remains enabled. I need the validation logic to enable/disable the button to persist as long as the user has the form open and if there is not a selection in ANY of the listboxes. The reason being is that if they click the command button it will update the cells in the worksheet, which if empty may overwrite previous work completed with blank cells.
I am trying to allow uses of a spreadsheet to be able to select one control button which would in turn disable another one via check boxes however the control buttons do not re-enable when the undo check box is selected.
I have been using this code and just noticed that it resets all of my options buttons to false when I exit and then re-enter (activate) the sheet with the option buttons.
I see where this is going on, but don't know how to correct it. I only want the option buttons changed to false if
The Sol named range is something other than "Primary Vendor". It seems to call the macro ClearOB whenener the sheet is activated.
Private Sub Worksheet_Activate() If Range("Sol").Value = "Primary Vendor" Then For Each OB In ActiveSheet.OptionButtons OB.Enabled = True Next OB ClearOB ActiveSheet.ScrollArea = "A1:K58"
i want my userform to operate like this: >each time the user opens the userform, he has to choose from the 1st combo box which AREA will he worked on (e.g., Math, English, History). upon selecting, the AREA chosen will populate the choices in the 2nd combo box (e.g. if Math, 2nd combo box will show: Algebra, Calculus, Trigonometry).
**thru some posts, this part is already solved. thanks. but this will lead me to my questions.
>1st and 2nd combobox selections (e.g., MATH, CALCULUS) serve as a match. Unique from the other matches.
>upon choosing the match, the user can encode in the succeeding textboxes (he would encode numbers). **this is in another Userform Which Saves Data To Two Different Worksheets DATA TO TWO DIFFERENT WORKSHEETS
>my userform has an EDIT command button.
***what VBA codes can i use so that when I click EDIT, the userform will display all the matches that I encoded. If I choose the match from such display, all that i encoded which are related to that match will be reverted to the userform so that i can edit it right at the userform?
I'm trying to make a userform to edit cell A1. So, by pulling up a macro (with other content in there already), how do I display the value in A1, and also have a button to modify its value/change it.