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 Send Values from TextBoxes to Specific Sheet on Network?

I am trying to modify the Ron de Bruin code, copy a range from closed
workbook, to actually SEND a range to a closed workbook. Rons code is he
http://www.rondebruin.nl/copy7.htm

The code that I am working with right now is below:
Sub CommandButton1_Click
Application.ScreenUpdating = False
On Error Resume Next

'Call the macro GetRange
Cells(4, 8) = TextBox1.Text
Cells(4, 9) = TextBox2.Text
Cells(5, 8) = TextBox3.Text
Cells(5, 9) = TextBox4.Text
Cells(6, 8) = TextBox5.Text
Cells(6, 9) = TextBox6.Text

GetRange "\\fsrv3\public\Forecast", "Weekly Forecast-Final-week12.xls",
"RVP - Andy", "H4:I6", Sheets("RVP - Andy").Range("A1")

On Error GoTo 0
Application.ScreenUpdating = True
End Sub

Sub GetRange(FilePath As String, FileName As String, SheetName As String, _
SourceRange 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

'Wait
Start = Timer
Do While Timer < Start + 2
DoEvents
Loop

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


Clearly this is set up to get a range from a sheet rather than sending a
range to a specific sheet, named €˜RVP €“ Andy. How can I send values in 6
TextBoxes on a UserForm to specific cells in a specific sheet of a specific
file on a corporate network? The cell references, sheets, location on the
network will always be the same -- just not sure how to get the data from a
stand alone workbook uploaded to a file on the network.

Any help on this would be greatly appreciated.

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
Send and Receive Data From Web Site Into UserForm TextBoxes Minitman Excel Discussion (Misc queries) 0 August 4th 08 05:33 PM
How to send variables to textboxes in a web site SupperDuck Excel Programming 1 July 31st 07 04:28 PM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM
How do I send a spreadsheet to a printer outside the network? Moe in Goffstown Excel Discussion (Misc queries) 3 February 14th 07 04:34 PM
macro to send excel sheet to specific email address JonnieP Excel Programming 2 November 27th 05 09:35 PM


All times are GMT +1. The time now is 10:07 PM.

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"