View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chris Chris is offline
external usenet poster
 
Posts: 244
Default Need new approach on forms I set up

Put this in your form's initialize event
Whe
'Mysheet' is your sheets name
'commandbutton1' is your buttons nam
CHANGE 'Range("a1")' to match the cell address of 'name of the purchaser'


On Error Resume Nex
If Sheets("MySheet").Range("a1").Value < "" the
Me.commandbutton1.Caption = Sheets("MySheet").Range("a1").Valu
End i

----- Bruce Roberson wrote: ----

I am going through and adapting one of my first projects I
wrote for myself last summer when I was first learning to
work with Excel VB. It had all these print forms on it
that I now need to adapt to another user

On one of these print forms, I had hard coded a caption
name of "Oneok" in this case to match as an identifier on
the invoice I was printing for that option button.

I could change the caption to read "Virginia Power" but if
the name of the purchaser ever changes, which it will,
then the user would have to go into the properties of the
form and change the caption. I know that is no good, so I
need to know how to maybe link that caption name in that
form to a range name perhaps, and it needs to update
itself whenever the form in question is called

Can someone help get me started with this approach, or
maybe ask me enough questions to where they can suggest
another approach for what I'm trying to adapt to another
user's work in this case

Thanks


Bruc