Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Sub DefineCell Address () returns the cell address but
it does not include which sheet the active cell is in? How can I put the Sheet and Cell address in the reference cell? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub GotoMyCellAaddress() Range(MyCellAddr).Select End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Scrabtree,
Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub GotoMyCellAaddress() Range(MyCellAddr).Select End Sub MyCellAddr= "'" & Activecell.parent.name & "'!" & activecell.address But that would cause the gotomycelladdress sub to fail. Maybe beter to set an object to the cell: Public MyCell As Range Sub DefineCellAddress() set MyCell = ActiveCell Worksheets("Sheet1").Range("A1").Value = "'" & activecell.parent.name & "'!" & Activecell.address End Sub Sub GotoMyCellAaddress() Application.Goto MyCell End Sub Regards, Jan Karel Pieterse Excel MVP www.jkp-ads.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
why not just use
application.goto sheets("Sheet1").Range("A1") -- Don Guillett SalesAid Software "scrabtree" wrote in message ... The Sub DefineCell Address () returns the cell address but it does not include which sheet the active cell is in? How can I put the Sheet and Cell address in the reference cell? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub GotoMyCellAaddress() Range(MyCellAddr).Select End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
disregard my last post. Helps to read it all.
-- Don Guillett SalesAid Software "scrabtree" wrote in message ... The Sub DefineCell Address () returns the cell address but it does not include which sheet the active cell is in? How can I put the Sheet and Cell address in the reference cell? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub GotoMyCellAaddress() Range(MyCellAddr).Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Additional cell colours | Excel Discussion (Misc queries) | |||
How to add additional description in a cell to a spreadsheet? | Setting up and Configuration of Excel | |||
inserting an additional line of text within same cell | Excel Worksheet Functions | |||
Inserting additional data into a cell | Excel Discussion (Misc queries) | |||
Add additional value to a cell | Excel Programming |