View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Kleev
 
Posts: n/a
Default Tons of questions

Answering the question in that last sentence:
=INDIRECT("a"&D5)

"Bob Phillips" wrote:



"famdamly" wrote in
message ...
1. I want to know if I can make a custom right click shortcut menu. Is
there a way to do this with excel? There should be.


Yes. An example.

Public Sub addMenu()
removeMenu 'just in case
With Application.CommandBars("Cell")
With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Routine1"
.OnAction = "Another"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Routine2"
.OnAction = "YetMore"
End With
End With
End Sub


Public Sub removeMenu()
On Error Resume Next
With Application.CommandBars("Cell")
.Controls("Routine1").Delete
.Controls("Routine2").Delete
End With
On Error GoTo 0
End Sub


2. I made forms with huge fonts and fields. How do I get data that is
input into these fields to also be compiled into a huge list on another
worksheet. On that same note, beings I'm working with multiple fields in
multiple forms and some left blank, I want to be sure that the data from
each field that corresponds with each particular job or customer doesn't
get mixed up or overlapped with other data because of the blanks. That
is if I use some kind of counter to slip into a formula for transfering
the data into the other worksheet. Which reminds me of the other problem
I encountered. I wanted to use a cell reference variable in a simple
formula. Like c5=a(d5) So if d5=7 then c5 will equal what a7 does.
I'm probably missing a symbol or two in the formula.


I was fine until I read the last sentence which makes no sense to me at all.


3. Can you run a macro from an if. The reason i ask is- I'm toggling
text when a button is pushed on a form next to the field. The toggle
button in controls I couldn't figure out a way to do it.


No. You can create your own VBA functions that return a result to th calling
cell, but change nothing else.

When you say form, do you mean a userform, or are you referring to something
designed on a spreadsheet?

4. In the drawing part of the program. Is there a way to make a shape
within a shape and lock it in to that other shape so when you drag the
big shape around the ones locked in move right along with it.


You can group shapes, which means they are effectively locked together.

5. Also if you make a rectangle is there a way to automatically attach
the formulated dimensions onto the rectangle. Also there should be a
way to name the object/shape and have that lock in too. I take it the
macro is the way to accomplish this.


VBA for sure.

Dim myShape As Shape

With ActiveSheet.Shapes
Set myShape = .AddShape(msoShapeRectangle, 239.25, 133.5, 135#,
71.25)
myShape.Name = "Shape4Bob"
End With