View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Marden[_6_] Dave Marden[_6_] is offline
external usenet poster
 
Posts: 14
Default How do I getting data from another worksheet?

I am trying to obtain the filename from the user than I store that filename
in the range "ReadFromFilename". Then I am trying to
use this filename from that range in determining the filename to read from.

The user click on a button which opens a file open dialog box, I obtain the
name from that. This filename I then put into the range ReadFromFilename.
I then use this name to determine which file the user wants me to obtain
values from. I also obtain the WriteToFilename so that I can grab data from
a newer version of my program. I am trying to make it easier for users of
my program to migrate from an earlier version to a newer version of my
program.

Dave Marden

Here is some code I've seen but for what I'm talking 'bout what I am showing
above. Any help would be appreciated.

Assuming that the workbooks are open:
Private Sub cmdRead_Click()
Workbooks("Data Gatherer For
Scoreboard.xls").Worksheets("Sheet1").Range("Handi cap") =
Workbooks("ReadFromFilename.xls").Worksheets("Comp etitors A-Z").Range("D29")
End Sub

Private Sub cmdWrite_Click()
Workbooks("WriteToFilename.xls").Worksheets("Compe titors A-Z").Range("D29")
= Workbooks("Data Gatherer For
Scoreboard.xls").Worksheets("Sheet1").Range("Handi cap")
End Sub