Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

I don't know if this helps any. I added a little to what you have.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"
--
Best wishes,

Jim


"Melody4572" wrote:

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

Well he does look better, but it still isn't doing the last half that I need
it to do. I think my brain has left me....the bad part is I still love this
stuff.

"Jim Jackson" wrote:

I don't know if this helps any. I added a little to what you have.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"
--
Best wishes,

Jim


"Melody4572" wrote:

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

Do you have a cell reference set up? I am assuming you have that.

The line "Refers to..." I assumed was an explanatory note and not actually
part of the procedure.

Can you tell me more about "RefireBLP"?
--
Best wishes,

Jim


"Melody4572" wrote:

Well he does look better, but it still isn't doing the last half that I need
it to do. I think my brain has left me....the bad part is I still love this
stuff.

"Jim Jackson" wrote:

I don't know if this helps any. I added a little to what you have.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"
--
Best wishes,

Jim


"Melody4572" wrote:

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default another macro questions

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

If you need to setup a Reference, Highlight the cell or group of cells that
you want to name as the Reference. In the box just above Column A you will
see the name of the first cell highlighted in the group. Click in that box
and type "target_cusip" (without quotes). The macro will then assign the
cell address entered in the Input Box to that cell.
--
Best wishes,

Jim


"Jim Jackson" wrote:

Do you have a cell reference set up? I am assuming you have that.

The line "Refers to..." I assumed was an explanatory note and not actually
part of the procedure.

Can you tell me more about "RefireBLP"?
--
Best wishes,

Jim


"Melody4572" wrote:

Well he does look better, but it still isn't doing the last half that I need
it to do. I think my brain has left me....the bad part is I still love this
stuff.

"Jim Jackson" wrote:

I don't know if this helps any. I added a little to what you have.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"
--
Best wishes,

Jim


"Melody4572" wrote:

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

sure
refireBLP is something that will relink (or rather update) the informaiton
to a stock market site.
No what the main issue is that I have been working 11 hour days for the last
two months and some of this is starting to blur before me. One more formula
tho and it will be complete and well worth it all. This is just a small
chunk of it. I need to move the referance cell around and since it is a
named cell that is used in other formulas I can't just say M111, it has to be
M111 is now target_cusp


"Jim Jackson" wrote:

Do you have a cell reference set up? I am assuming you have that.

The line "Refers to..." I assumed was an explanatory note and not actually
part of the procedure.

Can you tell me more about "RefireBLP"?
--
Best wishes,

Jim


"Melody4572" wrote:

Well he does look better, but it still isn't doing the last half that I need
it to do. I think my brain has left me....the bad part is I still love this
stuff.

"Jim Jackson" wrote:

I don't know if this helps any. I added a little to what you have.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"
--
Best wishes,

Jim


"Melody4572" wrote:

Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

I think I have looked at this too much. What I need for it to do is bring
up a box asking what cell address I want to use. Then I need to verify the
address to be used. I next want to name the cell target_cusip so that I can
use it in a larger formula. Why? Because sometimes the taget_cusp is M107
and sometimes it is M108, or M109....see why I would like to make it a little
easier? Thanks for any and all suggestions!

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

--
Best wishes,

Jim
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet





  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

Hi Jim. I think we are getting closer. What it keeps doing is typing the
cell address in the chosen cell now. and it isn't naming it target_cusp, but
if I ask it to go to the target_cusp it will go to that cell.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
Application.Run "RefireBLP"

I know it has to do with something I either forgot and have entered wrong,
I'm just not sure what or where....

"Jim Jackson" wrote:

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

nope won't work. Each cell has a formula in that imports information about
that stock and the main formaula needs to be able to call for target_cusp to
run information against the different stock that the cell is representing.
confusing yes?

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

I did figure out what I was doing wrong with typing in the cell. Now to get
the darn thing to say what it is named :-)

It still isn't naming it target_cusp, but
if I ask it to go to the target_cusp it will go to that cell.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

I know it has to do with something I either forgot and have entered wrong,
I'm just not sure what or where....

"Jim Jackson" wrote:

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

Change this line
ActiveCell.FormulaR1C1 = Res
to
ActiveCell.FormulaR1C1 = "target_cusip"
--
Best wishes,

Jim


"Melody4572" wrote:

I did figure out what I was doing wrong with typing in the cell. Now to get
the darn thing to say what it is named :-)

It still isn't naming it target_cusp, but
if I ask it to go to the target_cusp it will go to that cell.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

I know it has to do with something I either forgot and have entered wrong,
I'm just not sure what or where....

"Jim Jackson" wrote:

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default another macro questions

I used activecell.name instead of formula and now it is working perfectly!
Thandks for all your time and help in this Jim!

"Jim Jackson" wrote:

Change this line
ActiveCell.FormulaR1C1 = Res
to
ActiveCell.FormulaR1C1 = "target_cusip"
--
Best wishes,

Jim


"Melody4572" wrote:

I did figure out what I was doing wrong with typing in the cell. Now to get
the darn thing to say what it is named :-)

It still isn't naming it target_cusp, but
if I ask it to go to the target_cusp it will go to that cell.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

I know it has to do with something I either forgot and have entered wrong,
I'm just not sure what or where....

"Jim Jackson" wrote:

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet





  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default another macro questions

I'm glad we got this one "figgered out". :)

Always happy to help.
--
Best wishes,

Jim


"Melody4572" wrote:

I used activecell.name instead of formula and now it is working perfectly!
Thandks for all your time and help in this Jim!

"Jim Jackson" wrote:

Change this line
ActiveCell.FormulaR1C1 = Res
to
ActiveCell.FormulaR1C1 = "target_cusip"
--
Best wishes,

Jim


"Melody4572" wrote:

I did figure out what I was doing wrong with typing in the cell. Now to get
the darn thing to say what it is named :-)

It still isn't naming it target_cusp, but
if I ask it to go to the target_cusp it will go to that cell.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

I know it has to do with something I either forgot and have entered wrong,
I'm just not sure what or where....

"Jim Jackson" wrote:

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"


--
Best wishes,

Jim


"Melody4572" wrote:

I think it might, but I would need to see it to understand what you are
saying...forgive me for being dense but I think I can only see what's in my
mind. Maybe I am looking at it wrong. It's only going to move around 10
cells all in column M all one nect to the other..hmmm. Mabye.

"merjet" wrote:

It seems you are trying to move the name target_cusip around. Wouldn't
it be easier to leave its address fixed and copy the cusip (indicated
by the InputBox) to it?

Merjet



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
2 Questions 1 about Macro, 1 about VLookup wiredwrx Excel Programming 0 June 8th 06 08:38 PM
2 different macro questions inthestands Excel Worksheet Functions 1 December 28th 05 03:49 PM
Where can I post Macro questions? David Excel Worksheet Functions 4 May 25th 05 10:39 PM
Macro Questions filmfatale[_3_] Excel Programming 0 December 9th 03 03:12 PM
A Couple of Macro Questions Paul Excel Programming 4 October 3rd 03 02:43 AM


All times are GMT +1. The time now is 10:11 AM.

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

About Us

"It's about Microsoft Excel"