PC Review


Reply
Thread Tools Rate Thread

Code Help!! PLEASE

 
 
=?Utf-8?B?Ti5G?=
Guest
Posts: n/a
 
      13th Jun 2007
Does any one knows why this is not working?


Private Sub ComboBox1_Change()
if me.combobox1.value = "value1" then
With Me.ComboBox1.TopLeftCell
..Offset(0, 5) = "NIN"
..Offset(0, 6) = "NOUT"
..Offset(0, 7) = "IND"
..Offset(0, 8) = "TITLE"
..Offset(0, 9) = "CASE"
End With
else
With Me.ComboBox1.TopLeftCell
..Offset(0, 5) = "something"
..Offset(0, 6) = "else"
..Offset(0, 7) = "more"
..Offset(0, 8) = "ofmy"
..Offset(0, 9) = "stuff"
End With

End Sub


Any Help Greatly appreciated.
Do I need an End If somewhere?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R1M=?=
Guest
Posts: n/a
 
      13th Jun 2007
Yes, you're missing an End If!

You could try this:

Private Sub ComboBox1_Change()
With Me.ComboBox1.TopLeftCell
If Me.ComboBox1.Value = "value1" Then
.Offset(0, 5) = "NIN"
.Offset(0, 6) = "NOUT"
.Offset(0, 7) = "IND"
.Offset(0, 8) = "TITLE"
.Offset(0, 9) = "CASE"
Else
.Offset(0, 5) = "something"
.Offset(0, 6) = "else"
.Offset(0, 7) = "more"
.Offset(0, 8) = "ofmy"
.Offset(0, 9) = "stuff"
End If
End With
End Sub

hth
Garry
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linq to XML--Are there code examples that make Linq as easy as SQL? Or how can I convert ths simple pseudo code into real code? Reece Microsoft C# .NET 4 10th Dec 2008 03:13 AM
ATI Radeon Drivers - Code 43, Code 37 & Code 10 =?Utf-8?B?SmFrZQ==?= Windows Vista Hardware 14 29th Aug 2006 05:50 AM
ATI Display Drivers - Code 43, Code 37, Code 10 Jake Windows Vista Hardware 2 8th Jul 2006 04:00 PM
what is the difference between code inside a <script> tag and code in the code-behind file? keithb Microsoft ASP .NET 1 29th Mar 2006 02:00 AM
[New] Zipoid - ZIP Code, City Name and Area Code Lookup - Zip Code to Zip Code Distance Calculation Mel Freeware 0 22nd Jul 2005 04:13 PM


Features
 

Advertising
 

Newsgroups
 


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