Excel cell selection

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

Excel cell selection
problems of cell collection with "protect" 
Michael Kaden

Posts: 251
Joined: 2017-11-15
Dear Andrei,

YES the Activate method does solve the issue.

I tried many different scenarios and it worked perfect with all of them. By the way, to come back and show the initial sheet I use:

Dim shIndex As Integer
xlSheet = alera.AddinModule.CurrentInstance.GetActiveSheet()
shIndex = xlSheet.Index

other code then at the end

Dim wkb As Excel._Worksheet = CType(wSheets.Item(shIndex), Excel._Worksheet)

which also works very well.

kind regards

Posted 09 Feb, 2018 07:01:43 Top
Andrei Smolin

Add-in Express team

Posts: 17355
Joined: 2006-05-11
I see; I've missed that Activate works for you. That means, it does create that delay and this solves the issue. If so, you should adhere to it: it is *much* simpler than creating a delay in any other way.

I would suggest that you make sure that this approach works with latest builds of Excel 2013 and 2016.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Feb, 2018 07:09:21 Top