Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Makes Changes to Closed Excel File on LAN
I am using a UserForm to upload some data to an Excel file saved on a LAN.
The file will grow substantially in size, and as such, it will take a considerable amount of time to open the File, make the changes, and then close the file. Is there any way that I can make the changes to the €˜closed file on the LAN? Code he Private Sub CommandButton1_Click() Cells(12, 9) = TextBox1.Text Cells(12, 10) = TextBox2.Text Cells(12, 11) = TextBox3.Text Cells(13, 9) = TextBox4.Text Cells(13, 10) = TextBox5.Text Cells(13, 11) = TextBox6.Text Cells(14, 9) = TextBox7.Text Cells(14, 10) = TextBox8.Text Cells(14, 11) = TextBox9.Text 'Sub SaveValuesToNetworkFile() Dim p As String Dim f As String Dim s As String Dim r As String Dim ws As Worksheet p = "\\fsrv3\luna\public\Ryan\" f = "Destination.xls" s = "Sheet1" r = "I12:K14" Set ws = ActiveSheet Workbooks.Open (p & f) ' copy range values from current worksheet to same range in network file ws.Range(r).Copy Workbooks(f).Worksheets(s).Range(r) ' close network file, saving changes Workbooks(f).Close True UserForm1.Hide End Sub Thanks very much!! Ryan--- -- RyGuy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What makes a Large File in Excel? | Excel Discussion (Misc queries) | |||
excel file when opened makes 30 copies | Excel Discussion (Misc queries) | |||
Use ADO to transfer data from open excel file to closed excel file | Excel Programming | |||
Excel is not asking to save a changed file when the file is closed | Excel Discussion (Misc queries) |