Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old June 2nd, 2003, 10:02 PM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
VB excel message box

hmm...this time i need help with the message box. my code is as follows but i really dunno what is wrong with it....the message box pops out ok but the data displayed is not as what as i expected.

Private Sub CommandButton1_Click()
moo = LCase(Sheet5.TextBox1.Text)

b = 1
c = 1

If Sheet5.TextBox1.Text = "" Then
MsgBox "Please Key In a Value"
Exit Sub
End If

For a = 9 To 500

If LCase(Sheet3.Cells(a, 4)) = moo Then
Sheet5.Cells(b + 7, 1) = Sheet3.Cells(a, 2)
Sheet5.Cells(b + 7, 2) = Sheet3.Cells(a, 3)
Sheet5.Cells(b + 7, 3) = Sheet3.Cells(a, 10)
Sheet5.Cells(b + 7, 4) = Sheet3.Cells(a, 14)
Sheet5.Cells(b + 7, 5) = Sheet3.Cells(a, 24)
Sheet5.Cells(b + 7, 6) = Sheet3.Cells(a, 5)
b = b + 1
ElseIf LCase(Sheet2.Cells(a, 4)) = moo Then
Sheet5.Cells(c + 7, 1) = Sheet2.Cells(a, 2)
Sheet5.Cells(c + 7, 2) = Sheet2.Cells(a, 5)
Sheet5.Cells(c + 7, 3) = Sheet2.Cells(a, 9)
Sheet5.Cells(c + 7, 4) = Sheet2.Cells(a, 18)
Sheet5.Cells(c + 7, 5) = Sheet2.Cells(a, 25)
Sheet5.Cells(c + 7, 6) = Sheet2.Cells(a, 6)
c = c + 1

Exit Sub
End If
Next a
MsgBox "Invalid"


End Sub

Reply With Quote
  #2  
Old June 9th, 2003, 11:40 PM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Can you give some sample data, of what you are expecting to get, and what you actually get.
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
  #3  
Old June 10th, 2003, 12:40 AM
maya maya is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 29 maya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
access

its ok...coz eventually ive decided to use access instead...using excel is too risky as some functions that ive done like this is not able to handle many possible exceptions...

anyway r u familiar with access?? would be a great help for me as im now in the process of learning access...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > VB excel message box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway