how i make the excel send data or save it to another bad file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

for example if i have some data at a cell & another data to another cell
i just wanna to send these data to a bad file
 
hi,
usually i try to send data to a good file but try this. i have it as a menu
item on my pc.

Sub mac1SaveRange()

'Macro written by FSt1 4/27/03
'you must select the range to save BEFORE running this macro.

Dim cnt As Long
Dim cell As Range

If Selection.Cells.Count = 1 Then
If MsgBox("You have selected only one cell. Continue?????", vbYesNo,
"Warning") = vbNo Then
Exit Sub
End If
End If
cnt = 0
For Each cell In Selection
If Not IsEmpty(cell) Then
cnt = cnt + 1
End If
Next
If cnt = 0 Then
If MsgBox("There is no data in the selected range. Continue?!?!?!?!?",
vbYesNo, "Warning") = vbNo Then
Exit Sub
End If
End If
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
Application.Dialogs(xlDialogSaveAs).Show

End Sub

regards
FST1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top