LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving and searching Macro


First of all. Hi everyone ;)

I'm fairly new to the world of excel and know little to nothing about
using macro's. Now I have an idea which can save me a lot of work and I
think this is possible by using a macro.

Let me explain... I took some picture screens to make it easier to
understand what I want. The IMG tags doesn't seem to work on this forum
so you'll have to click.

Here you see a standard file which I open from my desktop.

[image: http://i54.photobucket.com/albums/g1...BP/Pic1-3.jpg]

In the next picture you see words/numbers in italic. I typ these over
from papers which people fax to me. The shipment number which I marked
in yellow is unique.

[image: http://i54.photobucket.com/albums/g1...BP/Pic2-2.jpg]

Now what I want to achieve is the following. I want to have a shortcut
key which saves the document in a map called Shipments as the unique
shipment number used in the document. So the document name in this
case is 118526.xls .
It will look something like this.

[image: http://i54.photobucket.com/albums/g1...BP/Pic3-1.jpg]

I already tried to fix a macro myself but it always comes up with the
same doc name in the map Shipments. So it always saves as 118526.xls.

Here you can see the code


Code:
--------------------
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/07/2006 by BPPassPort User
'
' Keyboard Shortcut: Ctrl+t
'
ChDir "C:\Documents and Settings\morgand\Desktop\Shipments"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\morgand\Desktop\Shipments\1128785.xls", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
End Sub
--------------------


I think I need to adjust the numbers in bold to a certain cell in which
the shipment number is present.

"C:\Documents and Settings\morgand\Desktop\Shipments\*1128785*.xls"

Extra:

I thought of an extra feature aswell. The reason I save these documents
is because I need to adjust them later on the day. Now is it possible to
have a macro search for a document number and then open it.
This is what I think it should look like.

[image: http://i54.photobucket.com/albums/g1...BP/Pic4-1.jpg]

If anyone can help me with this it would be very appreciated. Keep in
mind tho that my knowledge on visual basic isn't that great.

Thx in advance


--
TomBP
------------------------------------------------------------------------
TomBP's Profile: http://www.excelforum.com/member.php...o&userid=36112
View this thread: http://www.excelforum.com/showthread...hreadid=558858

 
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
Saving a spreadsheet without saving the Macro tedd13 Excel Programming 7 March 31st 06 02:17 PM
Searching Macro Dallas Green Excel Discussion (Misc queries) 3 May 13th 05 02:36 PM
Searching Data using Macro anang Excel Programming 1 October 12th 04 12:36 PM
searching different files macro fullymooned[_4_] Excel Programming 1 May 19th 04 05:36 PM
Column searching using macro or VB Richard Ruda Excel Programming 2 September 23rd 03 05:02 AM


All times are GMT +1. The time now is 07:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"