+ Reply to Thread
Results 1 to 4 of 4

a on_doubleclick statement is not working

  1. #1
    filo666
    Guest

    a on_doubleclick statement is not working

    Hi, could someone could tell me why this:
    public valuex as string
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    Boolean)
    Application.ScreenUpdating = False
    UserForm11.Show
    Target.Value = valuex
    Application.ScreenUpdating = True
    End Sub

    valuex =combobox3 (combobox3 on_change event)
    and valuex appears as empty althought I declared it (public valuex as string)
    I also trayed to declare valuex on my userform module
    TIA

  2. #2
    Rowan Drummond
    Guest

    Re: a on_doubleclick statement is not working

    Public variables should be declared in a standard module. The modules
    for sheets and forms are Class Modules. Try moving:
    public valuex as string
    to a standard module.

    Hope this helps
    Rowan

    filo666 wrote:
    > Hi, could someone could tell me why this:
    > public valuex as string
    > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    > Boolean)
    > Application.ScreenUpdating = False
    > UserForm11.Show
    > Target.Value = valuex
    > Application.ScreenUpdating = True
    > End Sub
    >
    > valuex =combobox3 (combobox3 on_change event)
    > and valuex appears as empty althought I declared it (public valuex as string)
    > I also trayed to declare valuex on my userform module
    > TIA


  3. #3
    filo666
    Guest

    Re: a on_doubleclick statement is not working

    Thank you very much, it works as expected

    "Rowan Drummond" wrote:

    > Public variables should be declared in a standard module. The modules
    > for sheets and forms are Class Modules. Try moving:
    > public valuex as string
    > to a standard module.
    >
    > Hope this helps
    > Rowan
    >
    > filo666 wrote:
    > > Hi, could someone could tell me why this:
    > > public valuex as string
    > > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    > > Boolean)
    > > Application.ScreenUpdating = False
    > > UserForm11.Show
    > > Target.Value = valuex
    > > Application.ScreenUpdating = True
    > > End Sub
    > >
    > > valuex =combobox3 (combobox3 on_change event)
    > > and valuex appears as empty althought I declared it (public valuex as string)
    > > I also trayed to declare valuex on my userform module
    > > TIA

    >


  4. #4
    Rowan Drummond
    Guest

    Re: a on_doubleclick statement is not working

    You're welcome.

    filo666 wrote:
    > Thank you very much, it works as expected
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1