ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how i make the excel send data or save it to another bad file (https://www.excelbanter.com/excel-worksheet-functions/43212-how-i-make-excel-send-data-save-another-bad-file.html)

[email protected]

how i make the excel send data or save it to another bad file
 
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

FSt1

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

" wrote:

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



All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com