Thread: HELP PLEASE
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default HELP PLEASE

neil,
rather than opening the workbook, try linking to it instead using formula.
Something like following may be of some help to you:

Sub GetData()
Dim mydata As String
'workbook location
'& range to copy
'change as required
mydata = "='C:\[MybookName.xls]Sheet1'!$A$1:$F$12"

'link to worksheet
With ThisWorkbook.Worksheets(1).Range("A1:F12")
.Formula = mydata

'convert formula to text
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
End Sub
--
jb


"Neil Holden" wrote:

Please help, i have an excel sheet which is full of data, I have set up a new
excel workbook which pulls information from the other excel sheet.

The problem i have is this user is constantly in the main excel sheet and I
need the data from his sheet, I have set up a scheldule to automatically open
my sheet during the night and close automatically, but it stays open in the
open files and this basically doesnt work.

If you know a better way of doing this please let me know it would be
greatly appreciated.

Neil.