+ Reply to Thread
Results 1 to 5 of 5

Copying ranges

  1. #1
    Don Lloyd
    Guest

    Copying ranges

    Hi,

    Scenario:
    2 Workbooks with identical worksheets i.e. Same layout, same controls.
    The main difference is that Workbook 1 one has data. Workbook 2 doesn't.

    Problem
    How do I copy a range of data from workbook 1 to workbook 2, including cell
    formatting, without also copying the controls across.

    I've tried a straight range copy but I finish up with duplicate controls.

    If I try copying the values, I get a merged cells complaint (although what
    few merged cells there are the same in each case) - the formatting is
    required anyway.

    I can do it if the properties of the controls in workbook 1 are set to
    "don't move or size with cells" but it's not really practical.

    Thanks,
    Don



  2. #2
    Norman Jones
    Guest

    Re: Copying ranges

    Hi Don,

    Try a dual copy / PasteSpecial operation: firstly values and then formats or
    vice versa).

    ---
    Regards,
    Norman



    "Don Lloyd" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    >
    > Scenario:
    > 2 Workbooks with identical worksheets i.e. Same layout, same controls.
    > The main difference is that Workbook 1 one has data. Workbook 2 doesn't.
    >
    > Problem
    > How do I copy a range of data from workbook 1 to workbook 2, including
    > cell formatting, without also copying the controls across.
    >
    > I've tried a straight range copy but I finish up with duplicate controls.
    >
    > If I try copying the values, I get a merged cells complaint (although what
    > few merged cells there are the same in each case) - the formatting is
    > required anyway.
    >
    > I can do it if the properties of the controls in workbook 1 are set to
    > "don't move or size with cells" but it's not really practical.
    >
    > Thanks,
    > Don
    >




  3. #3
    Don Lloyd
    Guest

    Re: Copying ranges

    Thanks Norman,

    I've tried that but I get a merged cells complaint (although what
    few merged cells there are the same in each case) when I paste the values.
    I hate merged cells in VBA and don't use them often :-)

    Don

    "Norman Jones" <[email protected]> wrote in message
    news:u%[email protected]...
    > Hi Don,
    >
    > Try a dual copy / PasteSpecial operation: firstly values and then formats
    > or vice versa).
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Don Lloyd" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi,
    >>
    >> Scenario:
    >> 2 Workbooks with identical worksheets i.e. Same layout, same controls.
    >> The main difference is that Workbook 1 one has data. Workbook 2 doesn't.
    >>
    >> Problem
    >> How do I copy a range of data from workbook 1 to workbook 2, including
    >> cell formatting, without also copying the controls across.
    >>
    >> I've tried a straight range copy but I finish up with duplicate controls.
    >>
    >> If I try copying the values, I get a merged cells complaint (although
    >> what few merged cells there are the same in each case) - the formatting
    >> is required anyway.
    >>
    >> I can do it if the properties of the controls in workbook 1 are set to
    >> "don't move or size with cells" but it's not really practical.
    >>
    >> Thanks,
    >> Don
    >>

    >
    >




  4. #4
    Norman Jones
    Guest

    Re: Copying ranges

    Hi Don,

    > I hate merged cells in VBA and don't use them often :-)


    I never use them.

    >>> I can do it if the properties of the controls in workbook 1 are set to
    >>> "don't move or size with cells" but it's not really practical.


    Why not write a simple macro to loop through the controls setting and then
    (after the copy operation) un-setting the property?

    ---
    Regards,
    Norman



    "Don Lloyd" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Norman,
    >
    > I've tried that but I get a merged cells complaint (although what
    > few merged cells there are the same in each case) when I paste the values.
    > I hate merged cells in VBA and don't use them often :-)
    >
    > Don
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:u%[email protected]...
    >> Hi Don,
    >>
    >> Try a dual copy / PasteSpecial operation: firstly values and then formats
    >> or vice versa).
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "Don Lloyd" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hi,
    >>>
    >>> Scenario:
    >>> 2 Workbooks with identical worksheets i.e. Same layout, same controls.
    >>> The main difference is that Workbook 1 one has data. Workbook 2 doesn't.
    >>>
    >>> Problem
    >>> How do I copy a range of data from workbook 1 to workbook 2, including
    >>> cell formatting, without also copying the controls across.
    >>>
    >>> I've tried a straight range copy but I finish up with duplicate
    >>> controls.
    >>>
    >>> If I try copying the values, I get a merged cells complaint (although
    >>> what few merged cells there are the same in each case) - the formatting
    >>> is required anyway.
    >>>
    >>> I can do it if the properties of the controls in workbook 1 are set to
    >>> "don't move or size with cells" but it's not really practical.
    >>>
    >>> Thanks,
    >>> Don
    >>>

    >>
    >>

    >
    >




  5. #5
    Don Lloyd
    Guest

    Re: Copying ranges

    Thanks again,

    With your help I think I can now work something out.

    Don

    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Don,
    >
    >> I hate merged cells in VBA and don't use them often :-)

    >
    > I never use them.
    >
    >>>> I can do it if the properties of the controls in workbook 1 are set to
    >>>> "don't move or size with cells" but it's not really practical.

    >
    > Why not write a simple macro to loop through the controls setting and then
    > (after the copy operation) un-setting the property?
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Don Lloyd" <[email protected]> wrote in message
    > news:[email protected]...
    >> Thanks Norman,
    >>
    >> I've tried that but I get a merged cells complaint (although what
    >> few merged cells there are the same in each case) when I paste the
    >> values.
    >> I hate merged cells in VBA and don't use them often :-)
    >>
    >> Don
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:u%[email protected]...
    >>> Hi Don,
    >>>
    >>> Try a dual copy / PasteSpecial operation: firstly values and then
    >>> formats or vice versa).
    >>>
    >>> ---
    >>> Regards,
    >>> Norman
    >>>
    >>>
    >>>
    >>> "Don Lloyd" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Hi,
    >>>>
    >>>> Scenario:
    >>>> 2 Workbooks with identical worksheets i.e. Same layout, same controls.
    >>>> The main difference is that Workbook 1 one has data. Workbook 2
    >>>> doesn't.
    >>>>
    >>>> Problem
    >>>> How do I copy a range of data from workbook 1 to workbook 2, including
    >>>> cell formatting, without also copying the controls across.
    >>>>
    >>>> I've tried a straight range copy but I finish up with duplicate
    >>>> controls.
    >>>>
    >>>> If I try copying the values, I get a merged cells complaint (although
    >>>> what few merged cells there are the same in each case) - the
    >>>> formatting is required anyway.
    >>>>
    >>>> I can do it if the properties of the controls in workbook 1 are set to
    >>>> "don't move or size with cells" but it's not really practical.
    >>>>
    >>>> Thanks,
    >>>> Don
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




+ 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