Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 8th 08, 12:16 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2008
Posts: 6
Default Named ranges and pasting formulas with named references

I have created a workbook that will copy and paste cells from another
workbook into itself using VBA. In the parent workbook is a range of cells
that are named, one of the formulas that is pasted from else where refers to
this named range. The copy/paste function works fine and the formulas work.
the problem that I have is that every time the formual is copied into the
parent work book a message is desplayed that read:

A formula or sheet you want to move containf the name 'ref', which already
exsts in the destination worksheet. Do yuo want to use this version of the
name?
To use the name as defined in the destination sheet, click Yes.
To rename the range reffered to int he formula or worksheet, click No, and
enter a new name in the Name Conflict dialog box.

i would like to be able to automatically choose Yes.

Is this possible and if so how?

  #2   Report Post  
Old October 8th 08, 12:30 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 1,073
Default Named ranges and pasting formulas with named references

On Oct 8, 10:16*pm, Dude3966
wrote:
I have created a workbook that will copy and paste cells from another
workbook into itself using VBA. In the parent workbook is a range of cells
that are named, one of the formulas that is pasted from else where refers to
this named range. The copy/paste function works fine and the formulas work.
the problem that I have is that every time the formual is copied into the
parent work book a message is desplayed that read:

A formula or sheet you want to move containf the name 'ref', which already
exsts in the destination worksheet. Do yuo want to use this version of the
name?
To use the name as defined in the destination sheet, click Yes.
To rename the range reffered to int he formula or worksheet, click No, and
enter a new name in the Name Conflict dialog box.

i would like to be able to automatically choose Yes.

Is this possible and if so how?


Try...

Application.DisplayAlerts = False

before the paste.

Ken Johnson
  #3   Report Post  
Old October 8th 08, 04:15 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2008
Posts: 6
Default Named ranges and pasting formulas with named references

Ken,

Thanks very much, that answers my question. It works exactly as i wanted.

Chris

"Ken Johnson" wrote:

On Oct 8, 10:16 pm, Dude3966
wrote:
I have created a workbook that will copy and paste cells from another
workbook into itself using VBA. In the parent workbook is a range of cells
that are named, one of the formulas that is pasted from else where refers to
this named range. The copy/paste function works fine and the formulas work.
the problem that I have is that every time the formual is copied into the
parent work book a message is desplayed that read:

A formula or sheet you want to move containf the name 'ref', which already
exsts in the destination worksheet. Do yuo want to use this version of the
name?
To use the name as defined in the destination sheet, click Yes.
To rename the range reffered to int he formula or worksheet, click No, and
enter a new name in the Name Conflict dialog box.

i would like to be able to automatically choose Yes.

Is this possible and if so how?


Try...

Application.DisplayAlerts = False

before the paste.

Ken Johnson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
References and named ranges Mike[_117_] Excel Programming 0 May 18th 07 07:38 PM
dynamically building references to named ranges [email protected] Excel Discussion (Misc queries) 1 January 3rd 06 10:23 PM
Named ranges: don't want absolute references sonicblue Excel Discussion (Misc queries) 0 November 22nd 05 02:05 PM
Named ranges: don't want absolute references sonicblue Excel Discussion (Misc queries) 0 November 22nd 05 02:05 PM


All times are GMT +1. The time now is 10:35 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017