Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Transferring data withour overwriting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SusieQ - 25 Jan 2006 10:48 GMT
Hi,

I need to transfer many different cells worth of data from man
different "Spares" workbooks into one "List" workbook.

I need this function to be automatic when the user clicks on
selection of buttons on "List". There will be different button
relating to the the different "Spares" workbooks that the data will b
taken from as not all of the "Spares" workbooks will be required all o
the time.

I also need the function not to overwrite any data already entere
either directly by the user or automatically into "List" from th
"Spares" workbooks.

I understand there is the ISBLANK function but I am usure how to use i
in this case.

Also the formatting of "List" is over three colums:
"Quantity", "Description" and "Part Number"
and does not start on cell A1.

A long question I know, but any ideas?

Thanks
Susi
Executor - 25 Jan 2006 11:35 GMT
Hi Susie,

I made something with these asumptions:
- for "List"
= Quantity in Column 'B'
= Description in Column 'C'
= Partnumber in Column 'D'
- for "Spares"
= Quantity on Sheet "Sales" in cell "G20"
= Description same sheet in cell "B1"
= Partnumber same sheet in cell "A1"

Sub InfoFromSpares(strName As String)
 Dim strQuantity As String
 Dim strDescription As String
 Dim strPartNumber As String

 ThisWorkbook.Sheets("List").Activate
 ActiveSheet.Range("B2").End(xlDown).Offset(1, 0).Select

 Application.Workbooks.Add (strName)
 strQuantity = ActiveWorkbook.Sheets("Sales").Range("G20").Value
 strDescription = ActiveWorkbook.Sheets("Sales").Range("B1").Value
 strPartNumber = ActiveWorkbook.Sheets("Sales").Range("A1").Value
 ActiveWorkbook.Saved = True
 ActiveWorkbook.Close

 ThisWorkbook.Activate
 ActiveCell.Value = strQuantity
 ActiveCell.Offset(0, 1).Value = strDescription
 ActiveCell.Offset(0, 2).Value = strPartNumber
 
End Sub

Hoop This Helps,

Executor
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.