Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Yes no drop down list and macros

I have an excel sheet that get imported into another workbook by way of a
macro.. This sheet contains two drop down lists.

When I run the macro I get an info box that pops up telling me:

"A formula or sheet you want to move or copy contains the 'YES_NO' which
already exists on the destination worksheet. Do you want to use this version
of the name?"

Can I add any code to the macro to always say yes to this and not see the
dialogue box ??


--
Thanks

Larry
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Yes no drop down list and macros

Try

Sub Macro()
Application.DisplayAlerts = False

'your code here

Application.DisplayAlerts = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Larry Fitch" wrote:

I have an excel sheet that get imported into another workbook by way of a
macro.. This sheet contains two drop down lists.

When I run the macro I get an info box that pops up telling me:

"A formula or sheet you want to move or copy contains the 'YES_NO' which
already exists on the destination worksheet. Do you want to use this version
of the name?"

Can I add any code to the macro to always say yes to this and not see the
dialogue box ??


--
Thanks

Larry

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 269
Default Yes no drop down list and macros

I did not test but try
Application.DisplayAlerts=false
and then reset after the copy
Application.DisplayAlerts=true

I know this works to suppress the message when deleting sheets

--
If this helps, please remember to click yes.


"Larry Fitch" wrote:

I have an excel sheet that get imported into another workbook by way of a
macro.. This sheet contains two drop down lists.

When I run the macro I get an info box that pops up telling me:

"A formula or sheet you want to move or copy contains the 'YES_NO' which
already exists on the destination worksheet. Do you want to use this version
of the name?"

Can I add any code to the macro to always say yes to this and not see the
dialogue box ??


--
Thanks

Larry

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Yes no drop down list and macros

THanks Jacob..

That worked great !!!

If I could ask another question... In the macro below I am able to source
the input sheet I am looking for and then I bascially do a copy and paste
into my workbook -

Sub Statistics_Input()
'
' Statistics_Input Macro
'
' Keyboard Shortcut: Ctrl+q
'
Application.DisplayAlerts = False
Application.ScreenUpdating = False
FOpen = Application.Dialogs(xlDialogOpen).Show(ThisWorkboo k.Path)
Range("C10:D88").Select
Selection.Copy
Windows(ThisWorkbook.Name).Activate
Sheets("Statistics").Select
Range("C10:D88").Select
ActiveSheet.Paste
Sheets("Selection Sheet").Select
Application.DisplayAlerts = True

End Sub

I cannot figure out how to close the source document after the cut and
paste..


--
Thanks

Larry


"Jacob Skaria" wrote:

Try

Sub Macro()
Application.DisplayAlerts = False

'your code here

Application.DisplayAlerts = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Larry Fitch" wrote:

I have an excel sheet that get imported into another workbook by way of a
macro.. This sheet contains two drop down lists.

When I run the macro I get an info box that pops up telling me:

"A formula or sheet you want to move or copy contains the 'YES_NO' which
already exists on the destination worksheet. Do you want to use this version
of the name?"

Can I add any code to the macro to always say yes to this and not see the
dialogue box ??


--
Thanks

Larry

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Yes no drop down list and macros

Try the below

Dim wb As Workbook
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.Dialogs(xlDialogOpen).Show ThisWorkbook.Path
Set wb = ActiveWorkbook
wb.ActiveSheet.Range("C10:D88").Copy _
ThisWorkbook.Sheets("Statistics").Range("C10")
wb.Close False
Application.DisplayAlerts = True
Application.ScreenUpdating = True

If this post helps click Yes
---------------
Jacob Skaria


"Larry Fitch" wrote:

THanks Jacob..

That worked great !!!

If I could ask another question... In the macro below I am able to source
the input sheet I am looking for and then I bascially do a copy and paste
into my workbook -

Sub Statistics_Input()
'
' Statistics_Input Macro
'
' Keyboard Shortcut: Ctrl+q
'
Application.DisplayAlerts = False
Application.ScreenUpdating = False
FOpen = Application.Dialogs(xlDialogOpen).Show(ThisWorkboo k.Path)
Range("C10:D88").Select
Selection.Copy
Windows(ThisWorkbook.Name).Activate
Sheets("Statistics").Select
Range("C10:D88").Select
ActiveSheet.Paste
Sheets("Selection Sheet").Select
Application.DisplayAlerts = True

End Sub

I cannot figure out how to close the source document after the cut and
paste..


--
Thanks

Larry


"Jacob Skaria" wrote:

Try

Sub Macro()
Application.DisplayAlerts = False

'your code here

Application.DisplayAlerts = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Larry Fitch" wrote:

I have an excel sheet that get imported into another workbook by way of a
macro.. This sheet contains two drop down lists.

When I run the macro I get an info box that pops up telling me:

"A formula or sheet you want to move or copy contains the 'YES_NO' which
already exists on the destination worksheet. Do you want to use this version
of the name?"

Can I add any code to the macro to always say yes to this and not see the
dialogue box ??


--
Thanks

Larry

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
Create Drop Down List of Macros Youlan Excel Discussion (Misc queries) 2 October 23rd 09 11:34 PM
ASSIG MACROS TO DROP DOWN LIST CaOrAl Excel Discussion (Misc queries) 7 January 6th 07 11:28 AM
Drop Down List choice selecting another drop down list CVD0722 Excel Worksheet Functions 3 October 31st 06 01:02 PM
Delete key not enabled on macros drop down list carol49 Excel Discussion (Misc queries) 3 August 27th 06 08:43 PM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM


All times are GMT +1. The time now is 03:19 PM.

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

About Us

"It's about Microsoft Excel"