Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data into sheet


In the following pic you see a Save and a Search button.

[image: http://i54.photobucket.com/albums/g1...philippe1.jpg]

These buttons are assigned to macro's. When I press the Save button th
current document will be saved as 123456.xls because it saves as th
value located in cell F10. This file is saved in the map shipment
which is located on a shared directory. I save multiple files in thi
map which all have a unique number attached to it.

Now when I want to recall any of those files I use the Search macro
Under the field of the Search button I can fill in one of the uniqu
numbers and it will open the file. Suppose I typed in 123456.xls i
will look like this.

[image: http://i54.photobucket.com/albums/g1...philippe2.jpg]

Now instead of opening the files next to my original Receipt Note I
MRN BP.xls I would like to implement the following idea.

When I fill in 123456 in the Search field and press the Search butto
it should copy the data from the 123456.xls file and paste it in th
original Receipt Note I - MRN BP.xls It must only copy paste the dat
from the following cells:

F2-F11
B13-B16
F13-F16
H13-L16
F18-F25
H18-M25
F29-F34
F40-H41
F43-F44

Here you have the macro's I use 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 = "Q:\Dist\Philippe\Shipments\"
ActiveWorkbook.SaveCopyAs _
Filename:=s1 & s & ".xls"
End Su
-------------------



Code
-------------------
Sub SearchAndOpen()
'
' SearchAndOpen Macro
' Macro recorded 7/07/2006 by Tom Fack
'
' Keyboard Shortcut: Ctrl+r
'

Dim s1 As String, bk As Workbook, bk1 As Workbook
s1 = "Q:\Dist\Philippe\Shipments\"

Set bk = ActiveWorkbook
If Dir(s1 & Range("B24").Text & ".xls") < "" Then
Set bk1 = Workbooks.Open(s1 & Range("B24").Text & ".xls")
bk.Activate
Else
MsgBox "workbook not found"
End If

End Su
-------------------


Thanks in advance for your tim

--
TomB
-----------------------------------------------------------------------
TomBP's Profile: http://www.excelforum.com/member.php...fo&userid=3611
View this thread: http://www.excelforum.com/showthread.php?threadid=56196

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
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
copying only selected data from Sheet 1 to Sheet 2 Jaf Excel Worksheet Functions 2 September 1st 09 01:01 AM
Copying the repeated data of the previous sheet to the next sheet Sasikiran Excel Discussion (Misc queries) 1 September 25th 07 03:18 PM
Copying Data from one sheet to another sheet on a specific day Gav123 Excel Worksheet Functions 0 May 1st 07 10:17 AM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


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

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"