+ Reply to Thread
Results 1 to 6 of 6

calander control and copy command problem

Hybrid View

  1. #1
    He4Giv
    Guest

    calander control and copy command problem

    Hello:
    I have a macro to invoke the calander control when a particular is active or
    selected. When I select the cell and the calander control appears I find the
    date I want, double click and that date drops in the active cell. the problem
    I found is when I inserted the calander control from Insert object pull
    down my paste function is greyed out. When I deleted the calander control my
    paste function became available.
    Here is the code that I have in my spreadsheet:

    Private Sub Calendar1_DblClick()
    ActiveCell.NumberFormat = "mm/dd/yy"
    ActiveCell = Calendar1.Value
    End Sub

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    Calendar1.Top = Target.Top + Target.Height
    Calendar1.Visible = True
    Else: Calendar1.Visible = False
    End If
    End Sub

    any help as to why my paste function is unavailabe (greyed out) when I
    insert the calander control?
    Thank you
    --
    He4Giv (****)

  2. #2
    Ron de Bruin
    Guest

    Re: calander control and copy command problem

    Hi

    I update my example
    http://www.rondebruin.nl/calendar.htm



    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > Hello:
    > I have a macro to invoke the calander control when a particular is active or
    > selected. When I select the cell and the calander control appears I find the
    > date I want, double click and that date drops in the active cell. the problem
    > I found is when I inserted the calander control from Insert object pull
    > down my paste function is greyed out. When I deleted the calander control my
    > paste function became available.
    > Here is the code that I have in my spreadsheet:
    >
    > Private Sub Calendar1_DblClick()
    > ActiveCell.NumberFormat = "mm/dd/yy"
    > ActiveCell = Calendar1.Value
    > End Sub
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    > Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    > Calendar1.Top = Target.Top + Target.Height
    > Calendar1.Visible = True
    > Else: Calendar1.Visible = False
    > End If
    > End Sub
    >
    > any help as to why my paste function is unavailabe (greyed out) when I
    > insert the calander control?
    > Thank you
    > --
    > He4Giv (****)




  3. #3
    He4Giv
    Guest

    Re: calander control and copy command problem

    Ron: The calander control works perfectly using your previous macro. The
    problem I have when the calander is inserted is it disables my paste and
    paste special functions (grayed out).
    For example: I want to copy Range A1 to Range A2 and the copy is selectable
    but not the paste. I found when I removed the calander (Insert>Object) my
    paste and paste special functions work again??
    --
    He4Giv (****)


    "Ron de Bruin" wrote:

    > Hi
    >
    > I update my example
    > http://www.rondebruin.nl/calendar.htm
    >
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > > Hello:
    > > I have a macro to invoke the calander control when a particular is active or
    > > selected. When I select the cell and the calander control appears I find the
    > > date I want, double click and that date drops in the active cell. the problem
    > > I found is when I inserted the calander control from Insert object pull
    > > down my paste function is greyed out. When I deleted the calander control my
    > > paste function became available.
    > > Here is the code that I have in my spreadsheet:
    > >
    > > Private Sub Calendar1_DblClick()
    > > ActiveCell.NumberFormat = "mm/dd/yy"
    > > ActiveCell = Calendar1.Value
    > > End Sub
    > >
    > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > > If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    > > Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    > > Calendar1.Top = Target.Top + Target.Height
    > > Calendar1.Visible = True
    > > Else: Calendar1.Visible = False
    > > End If
    > > End Sub
    > >
    > > any help as to why my paste function is unavailabe (greyed out) when I
    > > insert the calander control?
    > > Thank you
    > > --
    > > He4Giv (****)

    >
    >
    >


  4. #4
    Ron de Bruin
    Guest

    Re: calander control and copy command problem

    Hi

    I change one line in the code so the copy/paste will work outside A1:A100
    But you can't do it in the range


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > Ron: The calander control works perfectly using your previous macro. The
    > problem I have when the calander is inserted is it disables my paste and
    > paste special functions (grayed out).
    > For example: I want to copy Range A1 to Range A2 and the copy is selectable
    > but not the paste. I found when I removed the calander (Insert>Object) my
    > paste and paste special functions work again??
    > --
    > He4Giv (****)
    >
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi
    >>
    >> I update my example
    >> http://www.rondebruin.nl/calendar.htm
    >>
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "He4Giv" <[email protected]> wrote in message news:[email protected]...
    >> > Hello:
    >> > I have a macro to invoke the calander control when a particular is active or
    >> > selected. When I select the cell and the calander control appears I find the
    >> > date I want, double click and that date drops in the active cell. the problem
    >> > I found is when I inserted the calander control from Insert object pull
    >> > down my paste function is greyed out. When I deleted the calander control my
    >> > paste function became available.
    >> > Here is the code that I have in my spreadsheet:
    >> >
    >> > Private Sub Calendar1_DblClick()
    >> > ActiveCell.NumberFormat = "mm/dd/yy"
    >> > ActiveCell = Calendar1.Value
    >> > End Sub
    >> >
    >> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >> > If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    >> > Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    >> > Calendar1.Top = Target.Top + Target.Height
    >> > Calendar1.Visible = True
    >> > Else: Calendar1.Visible = False
    >> > End If
    >> > End Sub
    >> >
    >> > any help as to why my paste function is unavailabe (greyed out) when I
    >> > insert the calander control?
    >> > Thank you
    >> > --
    >> > He4Giv (****)

    >>
    >>
    >>




  5. #5
    He4Giv
    Guest

    Re: calander control and copy command problem

    When I used your macro I changed the range to ("B7") - ie:If Not
    Application.Intersect(Range("B7"), Target) Is Nothing Then.... so that when I
    clicked in B7 the calander would activate. Im still confused. Ive went all
    over the spreadsheet even out to column Z and down to Row 200 and the paste
    function is still disabled??
    --
    He4Giv (****)


    "Ron de Bruin" wrote:

    > Hi
    >
    > I change one line in the code so the copy/paste will work outside A1:A100
    > But you can't do it in the range
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > > Ron: The calander control works perfectly using your previous macro. The
    > > problem I have when the calander is inserted is it disables my paste and
    > > paste special functions (grayed out).
    > > For example: I want to copy Range A1 to Range A2 and the copy is selectable
    > > but not the paste. I found when I removed the calander (Insert>Object) my
    > > paste and paste special functions work again??
    > > --
    > > He4Giv (****)
    > >
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi
    > >>
    > >> I update my example
    > >> http://www.rondebruin.nl/calendar.htm
    > >>
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > >> > Hello:
    > >> > I have a macro to invoke the calander control when a particular is active or
    > >> > selected. When I select the cell and the calander control appears I find the
    > >> > date I want, double click and that date drops in the active cell. the problem
    > >> > I found is when I inserted the calander control from Insert object pull
    > >> > down my paste function is greyed out. When I deleted the calander control my
    > >> > paste function became available.
    > >> > Here is the code that I have in my spreadsheet:
    > >> >
    > >> > Private Sub Calendar1_DblClick()
    > >> > ActiveCell.NumberFormat = "mm/dd/yy"
    > >> > ActiveCell = Calendar1.Value
    > >> > End Sub
    > >> >
    > >> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > >> > If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    > >> > Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    > >> > Calendar1.Top = Target.Top + Target.Height
    > >> > Calendar1.Visible = True
    > >> > Else: Calendar1.Visible = False
    > >> > End If
    > >> > End Sub
    > >> >
    > >> > any help as to why my paste function is unavailabe (greyed out) when I
    > >> > insert the calander control?
    > >> > Thank you
    > >> > --
    > >> > He4Giv (****)
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Ron de Bruin
    Guest

    Re: calander control and copy command problem

    Hi

    You can't copy/paste B7 but you can use the copy/paste in all the other cells now

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "He4Giv" <[email protected]> wrote in message news:[email protected]...
    > When I used your macro I changed the range to ("B7") - ie:If Not
    > Application.Intersect(Range("B7"), Target) Is Nothing Then.... so that when I
    > clicked in B7 the calander would activate. Im still confused. Ive went all
    > over the spreadsheet even out to column Z and down to Row 200 and the paste
    > function is still disabled??
    > --
    > He4Giv (****)
    >
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi
    >>
    >> I change one line in the code so the copy/paste will work outside A1:A100
    >> But you can't do it in the range
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "He4Giv" <[email protected]> wrote in message news:[email protected]...
    >> > Ron: The calander control works perfectly using your previous macro. The
    >> > problem I have when the calander is inserted is it disables my paste and
    >> > paste special functions (grayed out).
    >> > For example: I want to copy Range A1 to Range A2 and the copy is selectable
    >> > but not the paste. I found when I removed the calander (Insert>Object) my
    >> > paste and paste special functions work again??
    >> > --
    >> > He4Giv (****)
    >> >
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi
    >> >>
    >> >> I update my example
    >> >> http://www.rondebruin.nl/calendar.htm
    >> >>
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "He4Giv" <[email protected]> wrote in message news:[email protected]...
    >> >> > Hello:
    >> >> > I have a macro to invoke the calander control when a particular is active or
    >> >> > selected. When I select the cell and the calander control appears I find the
    >> >> > date I want, double click and that date drops in the active cell. the problem
    >> >> > I found is when I inserted the calander control from Insert object pull
    >> >> > down my paste function is greyed out. When I deleted the calander control my
    >> >> > paste function became available.
    >> >> > Here is the code that I have in my spreadsheet:
    >> >> >
    >> >> > Private Sub Calendar1_DblClick()
    >> >> > ActiveCell.NumberFormat = "mm/dd/yy"
    >> >> > ActiveCell = Calendar1.Value
    >> >> > End Sub
    >> >> >
    >> >> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >> >> > If Not Application.Intersect(Range("A1:A100"), Target) Is Nothing Then
    >> >> > Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
    >> >> > Calendar1.Top = Target.Top + Target.Height
    >> >> > Calendar1.Visible = True
    >> >> > Else: Calendar1.Visible = False
    >> >> > End If
    >> >> > End Sub
    >> >> >
    >> >> > any help as to why my paste function is unavailabe (greyed out) when I
    >> >> > insert the calander control?
    >> >> > Thank you
    >> >> > --
    >> >> > He4Giv (****)
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




+ 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