Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default save as command in macro

Hi. Can someone help me please. I have two things that some help.

1. I've created workbook with multiple sheets, i made changes to one of the
sheet and i want to save that worksheet into new excel file. I've created a
macro but its not working.

2. I've created workbook with multiple sheets, eg, Sheet2 and Sheet 3. I
have a checklist template on Sheet 2 (see below), and on Sheet3, I need to
get the value from SHEET2 where FINDINGS=N (please see below), on SHEET 3 I
need the valud of CODE, DESCRIPTION and REMARKS

EG. SHEET2 (CHECKLIST)

CODE DESCRIPTION FINDINGS REMARKS
W32 STAIN N
STAIN ON FLOOR
W33 WALL PAINT Y

W34 TIMBER N
TIMBER DOOR

EG. SHEET3 (REPORT)

CODE DESCRIPTION REMARKS
W32 STAIN STAIN IN FLOOR
W34 TIMBER TIMBER DOOR

Appreciate your help.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default save as command in macro

1. Post the macro!
2.
Sub test()
Columns("C:C").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="N"
Selection.CurrentRegion.Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy Destination:=Worksheets("Munka2").Range("A1")
End Sub

Regards,
Stefi



€žexploringmacro€ť ezt Ă*rta:

Hi. Can someone help me please. I have two things that some help.

1. I've created workbook with multiple sheets, i made changes to one of the
sheet and i want to save that worksheet into new excel file. I've created a
macro but its not working.

2. I've created workbook with multiple sheets, eg, Sheet2 and Sheet 3. I
have a checklist template on Sheet 2 (see below), and on Sheet3, I need to
get the value from SHEET2 where FINDINGS=N (please see below), on SHEET 3 I
need the valud of CODE, DESCRIPTION and REMARKS

EG. SHEET2 (CHECKLIST)

CODE DESCRIPTION FINDINGS REMARKS
W32 STAIN N
STAIN ON FLOOR
W33 WALL PAINT Y

W34 TIMBER N
TIMBER DOOR

EG. SHEET3 (REPORT)

CODE DESCRIPTION REMARKS
W32 STAIN STAIN IN FLOOR
W34 TIMBER TIMBER DOOR

Appreciate your help.

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default save as command in macro

#1.

Option Explicit
Sub testme()
Dim wks As Worksheet

Set wks = ActiveSheet 'or worksheets("Somesheetnamehere")
wks.Copy 'to a new workbook

With ActiveSheet
'just overwrite the .xls file, don't give me a warning
Application.DisplayAlerts = False
.Parent.SaveAs _
Filename:="C:\" & Format(Now, "yyyymmdd_hhmmss") & ".xls", _
FileFormat:=xlworkbooknormal
Application.DisplayAlerts = True
.Parent.Close savechanges:=False
End With

End Sub

exploringmacro wrote:

Hi. Can someone help me please. I have two things that some help.

1. I've created workbook with multiple sheets, i made changes to one of the
sheet and i want to save that worksheet into new excel file. I've created a
macro but its not working.

2. I've created workbook with multiple sheets, eg, Sheet2 and Sheet 3. I
have a checklist template on Sheet 2 (see below), and on Sheet3, I need to
get the value from SHEET2 where FINDINGS=N (please see below), on SHEET 3 I
need the valud of CODE, DESCRIPTION and REMARKS

EG. SHEET2 (CHECKLIST)

CODE DESCRIPTION FINDINGS REMARKS
W32 STAIN N
STAIN ON FLOOR
W33 WALL PAINT Y

W34 TIMBER N
TIMBER DOOR

EG. SHEET3 (REPORT)

CODE DESCRIPTION REMARKS
W32 STAIN STAIN IN FLOOR
W34 TIMBER TIMBER DOOR

Appreciate your help.

thanks


--

Dave Peterson
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
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
disable save and saveas from menubar and save via command button Steve E Excel Programming 5 September 13th 06 11:51 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
set up a command button or macro for open file to "save as" Mo Excel Programming 1 June 23rd 05 12:19 AM
Specify a default file name in VB when the Save / Save As command. SMAN Excel Programming 1 September 14th 04 12:23 PM


All times are GMT +1. The time now is 05:38 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"