Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

Assign active cell to a variable

Posted by Melissa on January 31, 2002 3:09 PM
Is it possible to assign the address of the active cell to a variable? I'm trying to automate a linking procedure from one sheet to another.
ActiveCell.Value="=!" & cellAddress

Check out our Excel VBA Resources

Re: Assign active cell to a variable

Posted by Juan Pablo G. on January 31, 2002 3:15 PM
Not sure what you're trying to do. Create a formula that has the link ? or assign to the ActiveCell the value of cellAddress ?

Option 1.

ActiveCell.Formula = "='" & MySheet.Name & "'!" & cellAddress

I'm assuming MySheet is a Worksheet and cellAddress is a String.

Option 2.

ActiveCell.Value = MySheet.Range(cellAddress)

Juan Pablo G.


Re: Assign active cell to a variable

Posted by Melissa on January 31, 2002 3:29 PM
I need help!! I work in a call centre and I have an excel spreadsheet that logs each call using a VB form - its just a simple table with 6 columns with text data - I want to put it on a network so that 10-15 users can update it at once. I don't think this is possible by sharing the one workbook 'cause when you go to save you get conflict problems. I reckon that if I make a copy of the workbook for every user this would be easier. The problem is I don't know how to copy (and then clear)the contents of each workbook from the individual worksheets to one main workbook which stores the data in seperate worksheets for seperate days. Does that make any sense? :-)
Any advise would be great

Melissa, post again, got messed up [NT]

Posted by Juan Pablo G. on January 31, 2002 5:49 PM


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.