Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Kate
Sub test() Dim Message As String, Title As String, MyValue As String Dim Message1 As String, Title1 As String, MyValue1 As String Dim ws As Worksheet, r As Range, c As Range On Error GoTo Err Message = "Please enter the sheet name you want the cells copied from" Title = "Copy From" MyValue = InputBox(Message, Title) With Sheets(MyValue) Set r = .Cells.SpecialCells(xlCellTypeFormulas, 23) End With Message1 = "Please enter the sheet name you want the cells copied to" Title1 = "Copy To" MyValue1 = InputBox(Message1, Title1) Application.ScreenUpdating = False For Each c In r c.Copy Sheets(MyValue1).Range(c.Address) Next c Application.ScreenUpdating = True Exit Sub Err: MsgBox "Either a sheet name was not entered or the " & _ "sheet does not exist in this workbook" End Sub -- XL2002 Regards William "Katherina Holzhauser" wrote in message ... | Great - this one worked. One enhancement request: How do I prompt the | user to fill in the name of the sheet they want to copy from and the | name of the sheet they want to copy to? | | *** Sent via Developersdex http://www.developersdex.com *** | Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VB Script to copy incremental data from one sheet of workbook to o | Excel Discussion (Misc queries) | |||
Macro to copy values then delete row for entire sheet | New Users to Excel | |||
Macro to find matching date and copy values to another sheet | Excel Discussion (Misc queries) | |||
Copy Macro values to new sheet | New Users to Excel |