Selection of non-contiguous cells using VBA

dickindeventer
NewLounger
Posts: 11
Joined: 25 Dec 2015, 16:41

Selection of non-contiguous cells using VBA

Post by dickindeventer »

Hello,

In my appointment calendar I use the VBA code "Application.InputBox" to select the dates. (see image)

https://www.dropbox.com/s/nlhmu66npgpr1 ... t.jpg?dl=0

At least one of the users, being the CEO of the company, will not get the Inputbox to see and the program freezes. Most Excel instances work perfectly. So I really have to find another solution.

I am trying to write some code that will:
. Start the selection process,
. Allow the user to click on the different cells, or select a range of cells,
. After each selection_change, VBA adds the new selection to the selected ranges.
. Stop the selection process.

Would anyone have some suggestions to what methods I can use?

Thanks in advance.

Dick.

User avatar
HansV
Administrator
Posts: 78790
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Selection of non-contiguous cells using VBA

Post by HansV »

Do the users who experience problems use a different version of Excel? Or perhaps a different operating system (for example Mac vs Windows)?

As an alternative, you could display a calendar on a userform and let the user select dates there.
Best wishes,
Hans

dickindeventer
NewLounger
Posts: 11
Joined: 25 Dec 2015, 16:41

Re: Selection of non-contiguous cells using VBA

Post by dickindeventer »

The display of cells, or in this case a calendar, is something that i have not mastered yet. (would like to learn though)
The same like displaying filtered data, comboboxes et cetera.

The problem occurs only on one computer, using the same operating system and the same Excel.

User avatar
HansV
Administrator
Posts: 78790
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Selection of non-contiguous cells using VBA

Post by HansV »

If the problem is limited to one user, it might be worth a try to repair the Office installation on his/her computer.

You'll find an example of a userform calendar that should work in all versions of Excel at Calendar Control for All Office versions - including Office 2010 64 bit.
Best wishes,
Hans

dickindeventer
NewLounger
Posts: 11
Joined: 25 Dec 2015, 16:41

Re: Selection of non-contiguous cells using VBA

Post by dickindeventer »

Thanks for the tip.
1st. ICT is already looking into it.
2nd. I will look into it.
:thankyou: