Search macro adjustment

T

TomBP

I'm making use of the following save macro at the moment:


Code:
--------------------
Sub Save()
'
' Save Macro
' Macro recorded 7/07/2006 by BPPassPort User
'
' Keyboard Shortcut: Ctrl+t
'
Dim s As String, s1 As String
s = ActiveSheet.Range("F10").Text
s1 = "C:\Documents and Settings\" & _
"fackt0\Desktop\Excel probleem\Shipments\"
ActiveWorkbook.SaveAs _
Filename:=s1 & s & ".xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
--------------------



_What_does_it_do?_
When I run my save macro by pushing the Save button it will save the
document as the name 6666.xls in the map Shipments on my desktop.

_What_is_the_problem?_
It closes my original xls file (Receipt Note - Tom Fack.xls) and
changes it to 6666.xls.

_What_do_I_want?_
I want it to save 6666.xls to the map shipments but I want to continue
working in the original xls file (Receipt Note - Tom Fack.xls). So when
I press save, it looks like nothing happened. An extra feature would be
that when people press save a message will pop up with "Your file has
been saved".

Here are some pictures so you can see what I'm talking about:

[image: http://i54.photobucket.com/albums/g115/TomBP/savemacro.jpg]

[image: http://i54.photobucket.com/albums/g115/TomBP/6666.jpg]
 
A

Ardus Petus

Sub Save()
'
' Save Macro
' Macro recorded 7/07/2006 by BPPassPort User
'
' Keyboard Shortcut: Ctrl+t
'
Dim s As String, s1 As String
s = ActiveSheet.Range("F10").Text
s1 = "C:\Documents and Settings\" & _
"fackt0\Desktop\Excel probleem\Shipments\"
ActiveWorkbook.SaveCopyAs _
Filename:=s1 & s & ".xls"
End Sub


HTH
 

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

Similar Threads

Search and open feature 6
Saving and searching Macro 3
Hyperlink problem 2
Paste Data into other row 8
Add a button to a macro 6
Simplify save code 11
Pop-up Message on error 25
Assign macro 2

Top