ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating pages with 1 click.. (https://www.excelbanter.com/excel-programming/415417-creating-pages-1-click.html)

pls123

creating pages with 1 click..
 
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:

]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 !!

joel

creating pages with 1 click..
 
RowNumber = ActiveCell.Row
Set Col_D = Range("D" & RowNumber)

MyFormula = ]Sheet1'!" & Col_D.Address
Range("A18") = MyFormula

Column_Diff = Col_D.Column - ActiveCell.Column + 1

FName = ." & _
Column_Diff & "." & _
RowNumber & ".xlsm"
ThisWorkbook.SaveAs FName


"pls123" wrote:

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:

]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 !!


pls123

creating pages with 1 click..
 

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




"Joel" wrote:

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

MyFormula = ]Sheet1'!" & Col_D.Address
Range("A18") = MyFormula

Column_Diff = Col_D.Column - ActiveCell.Column + 1

FName = ." & _
Column_Diff & "." & _
RowNumber & ".xlsm"
ThisWorkbook.SaveAs FName


"pls123" wrote:

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:

]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 !!



All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com