Hi,
Say for example, you have a couple of modeless userforms on display and you want to run some small macro each time you activate each userform.
The obvious answer is simply placing the small macro (or a call to it) in each of the UserForm_Activate event handlers.
But what If you wanted to...
Hi dear forum,
In the past few months, I have posted various codes which show how to run code upon wheelmouse-scrolling.
Basically, intercepting the mouse scroll event relies on four known techniques : Subclassing, Installing a windows Mouse Hook, using the SetWinEventHook API or using the...
Hello all.
My goal at the moment is: To open Form1 as background, make it translucent, then use the openArgs to pass a name to open Form2 on top of it. When Form2 is closed Form1 to close automatically.
I achieved it easily with DoCmd.OpenForm but then I have to set WindowMode:=acDialog, which...
I have 25 text boxes named in the following manner on a UserForm
Name: id_[X]_box 1<= x <= 25
I am trying to write a program which can register a change event for all 25 boxes and populate the corresponding [DESCRIPTION] Labels.
Naming scheme for Description Labels Name: desc_[X]_label 1 <= X...
change
check event
class module
class modules
excel
form component
label
property
property let
property set
textbox
userform
userform_activate
userform_initialize
vba
withevents
Howdy gang
Trying to do a shortcut - Userform is having dynamic number of items created at runtime for the user to interact with.
I've done this successfully with Checkboxes, and that's all fine - but I was as I'm adding a lot of textboxes and comboboxes, and they all need an event fired on...
I am trying to find an event for a shape but this does not work:
Public WithEvents ShapesEvent As Shapes
because VBA doesn't recognise Shapes.
What should I declare it as?
Thanks
I know this is not directly Excel related, but I don't know if MR OUTLOOK exists, and the issue is related to trying to open a worksheet as a result of a certain email being delivered.
I previously had code in ThisOutlookSession that would mark deleted items read when they were added to the...
Hi forum,
I have a Workbook_SheetChange event for another workbook (other than the workbook that holds the code). At the end of a lengthy Sub, I call for the Sub that defines the Workbook's name that the event needs to work for:
Sub step1()
'''''code''''
NameGrabber.DefineWorkbookName
End...
I have a problem with my macro for outlook. I've created VBA as below to change default sender email address in Reply , Forward and New Email. I want to use group email as default sender address for all outgoing email. But it can work fine only for New Email. It does not work in Reply and...
Hi,
I have seen this question asked before and the usual workaround is to restore the worksheet name after the sheet has been renamed.. This is often done in the Worksheet Selection Change or deactivate events as follows :
Private Sub worksheet_SelectionChange(ByVal Target As Excel.Range)...
Morning folks (At least it is where I am). Hoping for some guidance please.
Not sure if this is the best idea or even possible, but here goes. Sorry if its a ramble and a long post, but there's information here that is beyond my meager experience and skills, but may well be perfectly clear and...
Hi all,
There are times when excel users need to detect when a cell is being mouse-clicked ... The worksheet Selection_Change event is often used for this purpose but it has two main problems :
A- it doesn't differenciate between keyboard and mouse selections
B- It doesn't work if the same cell...
I've been coding in Excel VBA for a while, but am fairly new to using Class Modules.
One of the classes I have created depends on another user-defined class that is defined in an add-in that only a few employees at my firm have. My issue is that whenever someone who doesn't have this add-in...
Hi all,
I am not experienced with network programming so I am asking here if the following prank would work (this is just an illustrative example)
Ok- Let's say a remote workbook (located in a network shared Drive/Folder) is currently opened by some user on the network and I wanted to play a...
I am attempting to add form controls dynamically to a blank form, and build a collection of those controls so I can write my own events. I'm having limited success.
The controls are successfully adding to the form, appear to be adding to the collection, but my click() event only works for the...
Greetings all.
Let me see if I can explain this clearly.
Suppose I have a UserForm with 10 CommandButtons. Each CommandButton has the same code inside its _Click event handler.
Now, because the Click event code for each CommandButton are the same ,we can, as you know, use a small Class...
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.