VBA Microsoft Programming Accessing Variables across slides

TheOuz 21 Reputation points
2020-06-26T11:56:21.413+00:00

Hello all, can you help?

I am trying to access a variable from slide 2 in a later slide

in the slide 2 code I have declared the variable as public

Public UserName As String

then I have set the value of this inside my button click function

Public Sub SaveName_Click()
    UserName = TextBox1.Value
End Sub

I am trying to access the variable on a later slide by using

Slide2.UserName

However I am having no luck, can anyone advise me on where I am going wrong?

Thank you in advance

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,630 questions
{count} votes

Accepted answer
  1. Anonymous
    2020-06-26T12:09:26.433+00:00

    Office development is not currently supported here on QnA. They're actively answering question in dedicated forums here.
    https://social.msdn.microsoft.com/forums/office/en-us/home?category=officedev
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
    https://answers.microsoft.com/en-us/msoffice/forum/msoffice_powerpoint-msoffice_custom

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


0 additional answers

Sort by: Most helpful