Questions about Addin Express Toys for Excel

Add-in Express™ Support Service
That's what is more important than anything else

Questions about Addin Express Toys for Excel
 
Andrei Smolin


Add-in Express team


Posts: 16314
Joined: 2006-05-11
If questions are on the same topic, please post them here.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 19 Feb, 2019 06:53:01 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
:)
Posted 27 Feb, 2019 04:51:59 Top
Andrei Smolin


Add-in Express team


Posts: 16314
Joined: 2006-05-11
Hello Leon,

I'm sorry for the delay with this issue; I've appeared busy with internal tasks.

Leon Lai Kan writes:
What is not working? The last 7 buttons on the 2nd row of the Ribbon do not work at all.

Why do they not work? Don't know. I tried to analyse the codes and found the following:

(a) The 1st 5 Operation buttons: The click events call Sub DoPastAction(). In my opinion, they should have called DoPasteSpecial() instead.


The last buttons are toggle buttons; their ToggleButton property is set to True. Clicking any them invokes the DoPastAction method, which resets the remaining toggle buttons. Please don't ask me why it is named that obscurely. The DoPasteSpecial() method checks the state (Pressed or not) of these toggle buttons, sets the operation variable accordingly and passes it to the Range.PasteSpecial() call.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Feb, 2019 09:06:06 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

Thanks for your reply.

Just one question:

Does the toy work at your end? (especially the last 7 buttons)

I have tried with the original download, and the last 7 buttons don't work at all.

I don't know what I have done wrong.


The click events call Sub DoPastAction(). In my opinion, they should have called DoPasteSpecial() instead.

What I mean is that (I may be wrong!) the button click events should call (or "fire" or "run" if you want) the SUB DoPasteSpecial() and not the SUB DoPastAction(). And this could be (again I may be wrong!) the reason why the buttons don't work.


Best Regards,
Leon
Posted 28 Feb, 2019 09:32:35 Top
Andrei Smolin


Add-in Express team


Posts: 16314
Joined: 2006-05-11
Leon,

First off, I do the following with no add-in:
I copy a cell containing 2. Select another cell, containing 3. Then I open the Paste Special dialog (see https://support.office.com/en-us/article/keyboard-shortcuts-for-paste-special-options-c31b7c9e-69ce-4b60-8c3a-dc5ea10d872c), in the Operation group, select Add and click okay. Putting aside formulas, formatting and other pretty things, doing the above pastes 2 in the call containing 3 and *adds* them.

Now, I use the add-in. I start with pressing down the button RibbonButtonPasteAdd. Then I select the cell containing 2, press Ctrl+C, select the cell containing 3, and, in RibbonMenuPasteSpecial, select any kind of paste. This also adds 2+3 to produce 5 in the target cell.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Feb, 2019 09:47:06 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Andrei,

It seems there is some miscommunication somewhere.

I am not talking of RibbonMenuPasteSpecial. This one works well.

I am talking of the 7 buttons (which are not on the menu), but rather to the right of the menu.

These 7 buttons do the following:
> 1. Paste None
> 2. Paste Add
> 3. Paste Subtract
> 4. Paste Multiply
> 5. Paste Divide
> 6. Skip Blanks
> 7. Transpose

It is these 7 buttons which do not work (at my end).
Please check if they do work at your end.

I know you are very busy, and it's not urgent for me. There are so many other samples to master.

So, please check the toy when you have time.

Best Regards,
Leon
Posted 28 Feb, 2019 10:18:19 Top
Andrei Smolin


Add-in Express team


Posts: 16314
Joined: 2006-05-11
Leon,

Leon Lai Kan writes:
> 2. Paste Add


That is the RibbonButtonPasteAdd in my post:

Andrei Smolin writes:
I start with pressing down the button RibbonButtonPasteAdd. Then I select the cell containing 2, press Ctrl+C, select the cell containing 3, and, in RibbonMenuPasteSpecial, select any kind of paste. This also adds 2+3 to produce 5 in the target cell.


If that button is *pressed*, pasting a call containing 2 to a cell containing 3, pastes whatever you chose to paste *and* performs the addition.

If that button isn't pressed, no addition is performed. Anyway, I suggest that you check the parameters of the PasteSpecial method at https://docs.microsoft.com/en-us/office/vba/api/excel.range.pastespecial. These buttons help you choose the value passed to the Operation parameter of that method.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Feb, 2019 10:55:03 Top