Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 11th, 2006, 11:45 AM
Fin Fin is offline
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBA Address

Hi,

I'm trying to get VBA to remember a cell address so that I can return to it after entering data below that row. For example, if I have a table full of data and then add a number of rows of data directly below it, I want to know where the new data starts so that I can adjust accordingly before I sort the entire table and save it ready for the next addition of new data.

Thought it might have gone a little like this but I'm wrong.

Sub Macro4()

    Range("C10").Select
    Range("A65001").Value = Selection.Address()
    Dim Address As Variant
        Address = Range("A65001").Value
    Address.Select
End Sub

Please can someone help me.

Many thanks,

Fin.

Reply With Quote
  #2 (permalink)  
Old January 11th, 2006, 11:49 AM
Friend of Wrox
 
Join Date: Jan 2005
Location: Bournemouth, Dorset, United Kingdom.
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Fin,

Sub Macro4()
    Dim myAddress
    Range("C10").Select
    myAddress = Selection.Address
    Range(myAddress).Select
End Sub

should sort your problems,

cheers

Matt

Reply With Quote
  #3 (permalink)  
Old January 11th, 2006, 12:43 PM
Fin Fin is offline
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Matt, works a treat.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Getting the MAC Address mswombat Classic ASP Basics 0 June 3rd, 2006 11:45 AM
how to get the value at the address?? keepsmiling_sruti VB How-To 3 July 8th, 2005 01:15 PM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM



All times are GMT -4. The time now is 01:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.