Thread: Copy
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Michael is offline
external usenet poster
 
Posts: 791
Default Copy

Hi!

When my workbook (VT - it includes only one sheet)) is opened (it's in a
network), this will happend:

ReportNumber = ActiveSheet.Range("e5").Value
ReportNumber = ActiveSheet.Range("e5").Value + 1

ActiveSheet.Range("e5").Value = ReportNumber

FileSaveName = ActiveWorkbook.Path
FileSaveNameEnd = FileSaveName & "\Arkiv\"
varName = ActiveSheet.Name
varDir = FileSaveNameEnd
varYear = Format(Date, "yy")
varNr = ReportNumber

On Error GoTo ErrorHandler:

ActiveSheet.SaveAs Filename:=varDir & varName & varNr & varYear

**After the workbook is opened a macro open another workbook called
Statistikk (the user should not see this)

Fileopen = ActiveWorkbook.Path
Fileopenend = Fileopen & "\Arkiv\" & "Statistikk"

Workbooks.Open "FileSaveName & FileSaveNameEnd & Statistikk"

**and here is my problem, i want the information that is put into cell e5
also should be put into a specific cell into the new workbook (Statstikk)
Sheet (Ark1)

*****Here is my problem

FirstCol =
Workbooks(Statistikk).Worksheets(Ark1).Range_("Rep ort_Number").Column

FirstRow = ReportNumber

Cells(FirstRow, FirstCol).Value = ReportNumber

I would appreciate all help!