Go Back   Tech Support Forum > Microsoft Support > Microsoft Office support

User Tag List

Excel macros

This is a discussion on Excel macros within the Microsoft Office support forums, part of the Tech Support Forum category. Maybe your expertise in Cell Naming procedures can solve this dilemma for me. Let me step you through this simple


Closed Thread
 
Thread Tools Search this Thread
Old 07-30-2012, 05:41 PM   #1
Registered Member
 
Join Date: Jul 2012
Posts: 1
OS: Windows7


Trash

Maybe your expertise in Cell Naming procedures can solve this dilemma for me. Let me step you through this simple problem.
Step #1 Highlight a specific cell (“E7”) on the worksheet.
Step #2 Initiate the running of the Macro named “Next”. (See macro below)

Sub Next()
ActiveWorkbook.Names.Add Name:="Next", RefersToR1C1:="=GENERAL!R7C5"
ActiveWorkbook.Names("charge").Comment = ""
Command
Command
Command
Application.Goto Reference:="Next"
Selection.ClearContents
End Sub.

The “Add Name” command, shown above was learned by using the “Record Macro” facility. You will note that in addition to naming the “ActiveCell” as desired, it also adds the exact cell location being named. This works fine for the first running of the macro. Because of the naming of the cell in the Macro’s first run, subsequent runs of this macro always names the same cell. It is apparent that this cell location is written in stone for all duration.
What I am searching for is a “generic” cell naming command, one that names the active cell without identifying the specific cell being named.
Any thoughts on this problem?

Thanx, Bill
ballyn is offline  
Sponsored Links
Advertisement
 
Old 07-30-2012, 06:26 PM   #2
TSF Team, Emeritus
 
spunk.funk's Avatar
 
Join Date: May 2010
Location: Los Angeles
Posts: 40,521
OS: Windows 10 64 bit

My System


MOving thread to the Office section of the Forum for better results.
__________________
Please press the Like link to right of any post you found helpful.
spunk.funk is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Printing Macros
Hello, I'm a complete VBA newbie and would appreciate some advice. I'm trying to achieve two things 1. Create an ActiveX Button on worksheet 2 that will print worksheet 1 but with all rows hidden where the content of the cell in column AJ=0 2. Create an ActiveX button on worksheet 2 that will...
sdhuk Microsoft Office support 0 01-16-2012 04:17 PM
[SOLVED] Excel Macros: copying contents of several cells into single cell
Hi, I have to collect contents of several cells in a row into a single cell in the same row. And I have to do it for thousands of rows, which is obviosly pretty a mundane job to do. Therefore I wanted to do it through some macros. While copying a content of a cell, the header of the...
nickjon Microsoft Office support 2 08-11-2011 02:45 PM
Excel MAcros
I write a UDF in excel macro , that is area(var1,var2) . i.e Function Area(Length As Double, Optional Width As Variant) If IsMissing(Width) Then Area = Length * Length Else Area = Length * Width End If End Function
vkanand Microsoft Office support 1 07-14-2011 07:44 AM
Using Macros in Excel 2003 to refresh data from a query
Hi, I'm quite the beginner when it comes to using macros in excel and i am trying to use excel to import data from an access query and then insert a command button to unable refreshing of this data. Currently i have imported the data and created the command button. I have tried simply recording...
mmclean Microsoft Office support 1 05-02-2011 04:42 PM
[SOLVED] Autosort in excel (novice to macros)
Greetings, I have seen posts regarding autosorting in excel - and I've tried the macros suggested, but I have never used macros before so I have no idea what I am doing. Help! I have a employees hours worksheet (Employee Name, Status, Hours worked) - and it is linked to a master worksheet. I...
kato2010 Microsoft Office support 25 04-13-2011 02:01 PM

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 on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts