creating pages with 1 click..

P

pls123

hi all!!
i try to explain my problem easily.. im italian so i will use a maccaronic
english !!
i have page 1 and page 2 saved in the folder..

page1 is simply an empty grid .. with numbers from -20 to +20 for rows and
standard numbered columns,
page2 is a sample page..with code and formulas...

i need this .. when i select a cell in page 1, for example cell "L200" ,
and i press "CTRL+K" i need to run a macro that creates a new page that saves
page2,
with written this in cell A18:

='C:\WB\[@@PILOT.F.MI.xlsm]Sheet1'!$D$200

and thus it is a "L" ,have to write -7 in cell A19 of page2 (if it was U it
would have been a 0 , V 1, W 2 , X 3....AO 20)

and also personalized name of the file...like this..
F.MI.-7.200.xlsm

let me know if u have any suggestion..ty !!
 
J

Joel

RowNumber = ActiveCell.Row
Set Col_D = Range("D" & RowNumber)

MyFormula = "='C:\WB\[@@PILOT.F.MI.xlsm]Sheet1'!" & Col_D.Address
Range("A18") = MyFormula

Column_Diff = Col_D.Column - ActiveCell.Column + 1

FName = "C:\WB\[@@PILOT.F.MI." & _
Column_Diff & "." & _
RowNumber & ".xlsm"
ThisWorkbook.SaveAs FName
 
P

pls123

hi joel ty
i will work on it
in the next days




Joel said:
RowNumber = ActiveCell.Row
Set Col_D = Range("D" & RowNumber)

MyFormula = "='C:\WB\[@@PILOT.F.MI.xlsm]Sheet1'!" & Col_D.Address
Range("A18") = MyFormula

Column_Diff = Col_D.Column - ActiveCell.Column + 1

FName = "C:\WB\[@@PILOT.F.MI." & _
Column_Diff & "." & _
RowNumber & ".xlsm"
ThisWorkbook.SaveAs FName


pls123 said:
hi all!!
i try to explain my problem easily.. im italian so i will use a maccaronic
english !!
i have page 1 and page 2 saved in the folder..

page1 is simply an empty grid .. with numbers from -20 to +20 for rows and
standard numbered columns,
page2 is a sample page..with code and formulas...

i need this .. when i select a cell in page 1, for example cell "L200" ,
and i press "CTRL+K" i need to run a macro that creates a new page that saves
page2,
with written this in cell A18:

='C:\WB\[@@PILOT.F.MI.xlsm]Sheet1'!$D$200

and thus it is a "L" ,have to write -7 in cell A19 of page2 (if it was U it
would have been a 0 , V 1, W 2 , X 3....AO 20)

and also personalized name of the file...like this..
F.MI.-7.200.xlsm

let me know if u have any suggestion..ty !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top