Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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
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
What makes a Large File in Excel? Don Excel Discussion (Misc queries) 3 April 26th 08 04:55 PM
excel file when opened makes 30 copies Richard Excel Discussion (Misc queries) 1 November 7th 07 01:24 AM
Use ADO to transfer data from open excel file to closed excel file JCanyoneer Excel Programming 1 April 1st 05 07:41 AM
Excel is not asking to save a changed file when the file is closed Ron Excel Discussion (Misc queries) 2 March 14th 05 01:05 AM


All times are GMT +1. The time now is 11:48 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"