Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default additional cell address help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default additional cell address help

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Additional cell colours Johanna Gronlund Excel Discussion (Misc queries) 1 September 10th 09 11:41 AM
How to add additional description in a cell to a spreadsheet? Judy S Setting up and Configuration of Excel 1 August 29th 07 05:09 PM
inserting an additional line of text within same cell knet22 Excel Worksheet Functions 2 February 17th 06 12:58 AM
Inserting additional data into a cell Alec H Excel Discussion (Misc queries) 4 February 9th 06 04:46 PM
Add additional value to a cell Rasmus[_2_] Excel Programming 2 September 7th 03 11:28 PM


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"