Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Ardus Petus...

Still getting "Run-time error '1004' Reference is not valid." Even if
its a simple

Application.Goto ActiveCell.Value

it still craps out...any thoughts?


Ardus Petus wrote:
Suppress the quotes!
Application.Goto Reference:=ActiveCell.Value

HTH
--
AP

a écrit dans le message de news:
...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

I just realized that when the format is in the DB1!R[2]C[-13] it works
however I don't understand the refrencing of that format..Row 2 Column
-13? Is there a better way of getting the macro to understand that I
want it to goto ??

SHEET NAME : DB1
Cell: A65500

Thanks your help is much appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

<According to Help for .GoTo
......Reference Optional Variant. The destination. Can be a Range object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove the
[Bookx.xls] that gets added
Application.Goto Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove the
[Bookx.xls] that gets added
Application.Goto Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

You do not need to "put in the workbook name inside of the
activecell.value".
It is generated by .ConvertFormula and consequently must be removed to give
a valid value for .Destination.

NickHK

wrote in message
ups.com...
Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range

object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove

the
[Bookx.xls] that gets added
Application.Goto

Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Nick,

Check your code because it isn't working...I keep getting told that the
refrence is invalid. It seems that even with the understanding that the
workbook name is inserted once its converted it still isn't making a
diffrence. I only want my macro to understand that it is to goto...

Sheet: DB1
Cell: B65500

There for its "DB1!B65500" in the activecell.value ?????? Is there a
pieace of code that converts the DB1!B565500 into the crappy refrenced
format of "DB1!R[2]C[-13]" without having to actually change the
properties of the cell, I mean even it does I can work around this but
somehow my formatting has to be changed by the macro and since I never
used the 'crappy formatting' then I am at a lost...


NickHK wrote:
You do not need to "put in the workbook name inside of the
activecell.value".
It is generated by .ConvertFormula and consequently must be removed to give
a valid value for .Destination.

NickHK

wrote in message
ups.com...
Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range

object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove

the
[Bookx.xls] that gets added
Application.Goto

Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

You could try some debugging yourself, to check the value returned at each
stage.

Correction:
Mid(Application.ConvertFormula(ActiveCell.Value, xlA1, xlR1C1),
Len(ActiveCell.Parent.Parent.Name) + 3)

NickHK

wrote in message
ups.com...
Nick,

Check your code because it isn't working...I keep getting told that the
refrence is invalid. It seems that even with the understanding that the
workbook name is inserted once its converted it still isn't making a
diffrence. I only want my macro to understand that it is to goto...

Sheet: DB1
Cell: B65500

There for its "DB1!B65500" in the activecell.value ?????? Is there a
pieace of code that converts the DB1!B565500 into the crappy refrenced
format of "DB1!R[2]C[-13]" without having to actually change the
properties of the cell, I mean even it does I can work around this but
somehow my formatting has to be changed by the macro and since I never
used the 'crappy formatting' then I am at a lost...


NickHK wrote:
You do not need to "put in the workbook name inside of the
activecell.value".
It is generated by .ConvertFormula and consequently must be removed to

give
a valid value for .Destination.

NickHK

wrote in message
ups.com...
Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range

object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and

remove
the
[Bookx.xls] that gets added
Application.Goto

Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get

my
macros to goto a specific location from a sheet...I'd figure the

code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function

of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but

the
macro is failing to realize what it is I am trying to do...Any

ideas?





  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

VBA does not need to "GoTo" or "select" or "activate" a cell to do something
to it or read something from it: that will just slow down your VBA to a
crawl.

all you need to do is to reference the cell:
worksheet("SheetDB1").Range("B65500")=123.456
or
worksheet("SheetDB1").Range("A1").offset(65499,1)= 123.456
or
worksheet("SheetDB1").Cells(65500,2)=123.456
or ....

regards
Charles
______________________
Decision Models
FastExcel 2.2 Beta now available
www.DecisionModels.com

wrote in message
ups.com...
Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range
object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove the
[Bookx.xls] that gets added
Application.Goto
Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?






  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Norma's code worked great...thank you for trying to help.


Charles Williams wrote:
VBA does not need to "GoTo" or "select" or "activate" a cell to do something
to it or read something from it: that will just slow down your VBA to a
crawl.

all you need to do is to reference the cell:
worksheet("SheetDB1").Range("B65500")=123.456
or
worksheet("SheetDB1").Range("A1").offset(65499,1)= 123.456
or
worksheet("SheetDB1").Cells(65500,2)=123.456
or ....

regards
Charles
______________________
Decision Models
FastExcel 2.2 Beta now available
www.DecisionModels.com

wrote in message
ups.com...
Nick I like your way of thinking but that isn't working either...the
[Bookx.xls] isn't in the activecell.value code and its not ever going
to be...I simply want VBA to understand that it is to goto a specific
area of the individual workbook and do something (which Ill program it
to do) however the refrence error happens with your code...even when I
put in the workbook name inside of the activecell.value... thanks for
atleast attempting to slove the issue.


NickHK wrote:
<According to Help for .GoTo
.....Reference Optional Variant. The destination. Can be a Range
object, a
string that contains a cell reference in R1C1-style notation,....
</According to Help for .GoTo

So, you have to convert your address to the correct format and remove the
[Bookx.xls] that gets added
Application.Goto
Reference:=Mid(Application.ConvertFormula(ActiveCe ll.Value,
xlA1, xlR1C1), Len(ActiveCell.Parent.Name) + 6)

I doubt this is the best way of achieving this, but it works.

NickHK

wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Hi Shaka,

Try:

'=============
Public Sub TesterA01()
Dim SH As Worksheet
Dim arr As Variant
Dim rng As Range

arr = Split(ActiveCell.Value, "!")

Set SH = Sheets(arr(0))
Set rng = SH.Range(arr(1))

Application.Goto Reference:=rng

End Sub
'<<=============


---
Regards,
Norman



wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?



  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Application.Goto Reference:="ActiveCell.Value"??? Whats wrong??

Norman Jones,

I would kiss your feet if you were in front of me...the logic of that
VB code is quite the interesting bit of code...I am grateful that I
still get answers to some of these hard ass questions even at 5:32 AM
in the morning. You have saved me so much trouble instead of having to
use 300,000 names in a workbook...I sorta wish someone could have
provided this code to me earlier instead of having me run in circles
trying to figure out what was wrong with my workbook. Thanks so much!

-Shaka215


Norman Jones wrote:
Hi Shaka,

Try:

'=============
Public Sub TesterA01()
Dim SH As Worksheet
Dim arr As Variant
Dim rng As Range

arr = Split(ActiveCell.Value, "!")

Set SH = Sheets(arr(0))
Set rng = SH.Range(arr(1))

Application.Goto Reference:=rng

End Sub
'<<=============


---
Regards,
Norman



wrote in message
ps.com...
Hello fellow programmers! I am in need of some help trying to get my
macros to goto a specific location from a sheet...I'd figure the code
would look like this...

Application.Goto Reference:="ActiveCell.Value"

The problem is I am told my refrence isn't correct..however I have
tried to format it the way it works when I use the "Goto" function of
Excel (CRTL + G) the format I am using in the active cell is...

SheetDB1!B65500

When I copy this code and use the goto function it works fine but the
macro is failing to realize what it is I am trying to do...Any ideas?


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
Whats the new "Template Wizard with Data Tracking"? Will Excel Worksheet Functions 4 February 7th 07 09:35 AM
How to change "automax" to "autosum"? (probablyl wrong terminology) [email protected] Excel Discussion (Misc queries) 5 November 6th 06 08:07 PM
whats the big "Page 1" that appears across my spreadsheet? Jennifer Excel Discussion (Misc queries) 1 September 12th 06 05:24 PM
Application.Goto reference:="MyCell" akyhne[_2_] Excel Programming 1 August 16th 05 12:30 PM
Whats wrong with this VBA statement -ActiveCell.FormulaR1C1...? hal Excel Programming 5 November 8th 03 02:48 AM


All times are GMT +1. The time now is 09:52 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"