VBA to mouse scroll listbox for Outlook 365

jonnathanjons
Lounger
Posts: 37
Joined: 13 Apr 2023, 09:08

VBA to mouse scroll listbox for Outlook 365

Post by jonnathanjons »

Hello Team,

In a previous topic I posted, this forum helped me to achieve a long time wish.
https://eileenslounge.com/viewtopic.php?f=34&t=39583

This includes a ListBox . I have attached a scroll bar in the side of the ListBox. But the mouse scroll is not working. When I google I found there is a separate vba script to be added. But I could not see one for Outlook 365.All I see the in google is scroll vba for excel and not sure which one to apply.
I am also not sure if there a separate vba module to be created and how do I attach that module to the Listbox created already.

Appreciate your help.
If there is any link available help me step by step ,I can refer that. thanks as always.

jonnathanjons
Lounger
Posts: 37
Joined: 13 Apr 2023, 09:08

Re: VBA to mouse scroll listbox for Outlook 365

Post by jonnathanjons »

Any help is appreciated..for vba for mouse scroll for list box in outlook 365. I could see for excel in other forums but not for outlook 365

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

Re: VBA to mouse scroll listbox for Outlook 365

Post by HansV »

Do you mean the online version of Outlook, or the desktop version?

If it is the desktop version, VBA code for Excel should work there too.
Best wishes,
Hans

jonnathanjons
Lounger
Posts: 37
Joined: 13 Apr 2023, 09:08

Re: VBA to mouse scroll listbox for Outlook 365

Post by jonnathanjons »

Hello Han,

I am using below script. but the mouse scroll is not working. When I say mouse scroll I am trying to use the mouse wheel . I can move the scroll bar by using mouse manually but not through mouse wheel. I am wondering if its possible.

Private Sub UserForm1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
HooklistScroll Me, Me.UserForm1
End Sub

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

Re: VBA to mouse scroll listbox for Outlook 365

Post by HansV »

I cannot help you with this, sorry.
Best wishes,
Hans

jonnathanjons
Lounger
Posts: 37
Joined: 13 Apr 2023, 09:08

Re: VBA to mouse scroll listbox for Outlook 365

Post by jonnathanjons »

No Problem. But thanks for checking.