LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default working with 2 or vba's on the same sheet

hiya i have been reading up and following suggestions by other users however
this has meant that i am using more then one VBA on my worksheet. which
results in an error when system tries to activate the VBA error message
displays (ambigiuos name detected)

is there a way to get both or, more then one VBA with same name on a sheet?

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A2"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B2").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Cells.EntireColumn.AutoFit
Application.EnableEvents = True
End Sub

also how do you put a VBA into a workbook/ excel so i don't have to copy
paste the same VBA on every page? again this will probably have more then one
VBA in it
--
deejay
 
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
PUTTING VBA'S TOGETHER confused deejay Excel Worksheet Functions 5 September 1st 08 03:56 AM
Conflicting VBA's pdberger Excel Programming 2 March 3rd 08 08:52 PM
XML equivalent of VBA's XLdown Nick Flyger Excel Programming 1 December 7th 06 01:27 AM
Bug in Excel's (not VBA's) MOD function Jerry W. Lewis Excel Worksheet Functions 10 August 30th 05 05:13 PM
VBA's Future xnman Excel Programming 3 October 20th 03 07:04 PM


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

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"