Excel visual basic problems - help please

Excel visual basic problems - help please

Post by Daniel Gordo » Thu, 11 Jan 1996 04:00:00




Quote:> Can anyone help me with a couple of problems I'm having.

> Problem 1.

> I want the name on a macro 'button' to get it's text from another
> location.

Why don't you write macros to rewrite the button's text ? Why do you need
to take the button's text from a cell instead of rewritting it straight
using a macro ?

Quote:

> Problem 2.

> I have a ton of macros written and now want to reshape the spreadsheet
> they reference. It's going to be *y painful if I don't find a
> resolution.

There is only one solution for this. Before making the changes you want
to your worksheet, try to give names to the ranges you use in macros.
Then change your macros, replacing all the range references by their range
names. Save the file and then make the changes to your worksheet. The
range names will be updated automaticaly as you make changes in the
worksheet.
This is the only option you have. If you have any questions please
feel free to contact me by email. Hope it helped.

> Many thanks in advance.......
> --
> Paul Hodges


                                            Gordon Daniel

 
 
 

1. Excel visual basic problems - help please

Can anyone help me with a couple of problems I'm having.

Problem 1.

I want the name on a macro 'button' to get it's text from another
location.
i.e. I have drawn a button on the screen and assigned a macro to it
but I would like the name on the button itslef to change depending
on various other factors.
For example, maybe the name on the button could be entered in a cell
elsewhere and then be referenced to the button.
I could then use various macros to rewrite the cell as needed, thereby
changing the button name.
Any ideas?

Problem 2.

I have written a long macro (by recording) in visual basic. When I went
into the spreadsheet and inserted some rows and columns, the referenced
cells in the macro all now address the wrong cells.
It seems that visual basic does not adjust the cell adresses.
This is not a problem with formulas because excel will modify any cell
formula as you 'play around' with any of your spreadsheets. It doesn't
happen with macros.

I have a ton of macros written and now want to reshape the spreadsheet
they reference. It's going to be bloody painful if I don't find a
resolution.

Anyone found a way round this?

Many thanks in advance.......
--
Paul Hodges

2. Arrow Point/Cisco load balancer - Urgent help :(

3. Upgrade Visual Basic 3.0 to Visual Basic 6.0 or Visual Basic.NET

4. Q: mouse enter and mouse leave events?

5. Visual Basic in Excel 97 - Beginners Help Please.

6. Problems running netmeeting

7. Visual Basic, Visual Basic for Applications, MindWrapBasic, Sax Basic?

8. beginner

9. Controlling PDF Viewing from Visual Basic - Help Please!!

10. Visual Basic Help Please

11. help: visual basic and excel

12. Visual Basic in Excel --- Help

13. visual basic macro for excel....help!