Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Excel > Help!!! Code From 03 Won't Work in 07??


Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2007, 08:41 AM
RunTime91 RunTime91 is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 359
Default Help!!! Code From 03 Won't Work in 07??


Greeting Experts!

This is my first experience with writing code in an '03 environment and then having the book copied into an '07 envorinment.

The code is triggered from an embedded CommandButton in Sheet1 however, the user is saying the code is not working and he is not sure if the button is even compressing.

Will someone please take a look at my code and offer any suggestions as to what rules I may have broke here...

Thank You All, Very Much!

Code:
Private Sub CommandButton1_Click() Application.ScreenUpdating = False If ActiveCell.Column <> 25 Or _ ActiveCell.Row > 160 Then Msg = MsgBox("Blah Blah Blah", vbOKOnly, "ERROR") Exit Sub End If With ActiveCell .Value = "NO EXIT" .Offset(0, 1).Value = "NO EXIT" .Offset(0, 2).Value = "NO EXIT" .Offset(0, 4).Value = "NO EXIT" .Offset(0, 9).Value = "NO EXIT" .Offset(0, 10).Value = "NO EXIT" .Offset(0, 11).Value = "NO EXIT" .Offset(0, 12).Value = "NO EXIT" .Offset(0, 13).Value = "NO EXIT" .Offset(0, 19).Value = "NO EXIT" .Offset(0, 20).Value = "NO EXIT" .Offset(0, 22).Value = "NO" .Offset(0, 23).Value = "EXIT IF" .Offset(0, 24).Value = "EXIT IF" .Offset(0, 25).Value = "EXIT IF" .Offset(0, 26).Value = "EXIT IF" .Offset(0, 27).Value = "EXIT IF" .Offset(0, 28).Value = "EXIT IF" .Offset(0, 29).Value = "EXIT IF" .Offset(0, 30).Value = "EXIT IF" .Offset(0, 31).Value = "EXIT IF" .Offset(0, 32).Value = "EXIT IF" .Offset(0, 33).Value = "EXIT IF" .Offset(0, 34).Value = "EXIT IF" .Offset(0, 35).Value = "EXIT IF" .Offset(0, 36).Value = "EXIT IF" .Offset(0, 37).Value = "EXIT IF" .Offset(0, 38).Value = "EXIT IF" .Offset(0, 39).Value = "EXIT IF" End With Application.ScreenUpdating = True End Sub

Thanks Again!
Reply With Quote
  #2  
Old 11-02-2007, 01:54 PM
RunTime91 RunTime91 is offline
Junior Contributor
 
Join Date: Mar 2005
Posts: 359
Default

Update:
Apparently there are some additional Security measures (ActiveX) that need to be turned off (or on depending on your perspective) . Once this was done everything worked fine.

Thanks to all who stopped by...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->