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: 2,836
Default Upload Data from Sheet1 on Local Machine to Sheet1 on LAN

Upload Data from Sheet1 on Local Machine to Sheet1 on LAN

I am trying to modify the Ron De Bruin code that I found he
http://www.rondebruin.nl/copy7.htm

Basically, I am trying to upload data from a range ("A1:B4") in Sheet1 on my
computer to a file saved on a LAN. I am trying to use the code below, but it
needs to be modified to SEND the data to the file on the LAN, not RECEIVE the
data from the file on the LAN.

I am guessing that the Sub GetRange is ordered incorrectly, but I cant
figure out how to straighten it out. If someone sees the error please let
me know. Also, let me know if you need any clarification on anything.

Sub File_In_Network_Folder()
Application.ScreenUpdating = False
On Error Resume Next



'Call the macro GetRange
GetRange Sheets("Sheet1").Range("A1"), _
"\\fsrv3\public\Sales Operations\Ryan", _
"Destination.xls", _
"Sheet1", _
Range("A1:B4")



On Error GoTo 0
Application.ScreenUpdating = True
End Sub


Sub GetRange(SourceRange As String, _
FilePath As String, _
FileName As String, _
SheetName As String, _
DestRange As Range)


Dim Start


'Go to the destination range
Application.Goto DestRange


'Resize the DestRange to the same size as the SourceRange
Set DestRange = DestRange.Resize(Range(SourceRange).Rows.Count, _
Range(SourceRange).Columns.Count)


'Add formula links to the closed file
With DestRange
..FormulaArray = "='" & FilePath & "/[" & FileName & "]" & SheetName _
& "'!" & SourceRange


'Make values from the formulas
..Copy
..PasteSpecial xlPasteValues
..Cells(1).Select
Application.CutCopyMode = False
End With
End Sub


Regards,
Ryan---


--
RyGuy
 
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
A1 Sheet2 is linked to A1 sheet1 so that user enters value(abc123) a1 sheet1 and A1 sheet2 is updated pano[_3_] Excel Programming 2 October 28th 07 02:32 PM
Copy from file1 sheet1/file2 sheet1 last blank row Tasha Excel Programming 2 August 22nd 07 08:24 PM
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') Lawrence C H Tan Excel Worksheet Functions 0 January 19th 07 08:29 PM
Sheet1.Activate vs Sheet1.Select mikeburg[_46_] Excel Programming 4 October 11th 05 04:30 PM
Why Sheet1 is displayed in modules as sheet1 Jim at Eagle Excel Programming 2 April 22nd 05 03:09 PM


All times are GMT +1. The time now is 09:02 PM.

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"