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
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 12th, 2003, 10:03 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
Unhappy Excel VB help

ok im out of ideas here so i need some help in some coding here.... i have an excel worksheet database that look like this

2 3 4 5 6 7 8
y y y y

ok so in the display sheet, i want it to be displayed so that one column can only take 5 data and if there is extra than it should be displayed in the next column.
Like the data above, it still can be displayed in one column coz there r only 4 numbers with y but if there r extra, how to do??

Thanx a lot for helping me....

Reply With Quote
  #2  
Old June 12th, 2003, 10:04 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
coding

what ive done so far is like below

For i = 3 To 500
If LCase(Sheet2.Cells(i, 2)) = program Then
Sheet1.Cells(20, 2) = UCase(program)

j = 4


For l = 4 To 20

If Sheet2.Cells(i, l) = "Y" Then

Sheet1.Cells(j + 17, 4) = Sheet2.Cells(2, l)
j = j + 1

End If
Next l

Exit Sub
End If
Next i
MsgBox "Invalid"
End Sub

Reply With Quote
  #3  
Old June 16th, 2003, 12:11 PM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
any chance you could attach a sample worksheet?

Reply With Quote
  #4  
Old June 16th, 2003, 08:20 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
solved

its ok ive solved it...thanx

Reply With Quote
  #5  
Old June 18th, 2003, 02:28 PM
Coax Coax is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: South Africa
Posts: 3 Coax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Coax
Wink RE: Excel VB Help

Hi,

Just because you asked nicely I will throw you a bone. I am assuming that you have properly declared and initialized your excell objects through the right references (Preferebly a library not younger that version 8).

Since I trust that you did I will then move on and dispense with the blunt hummor.

You need to manipulate the thing from the inside. You cannot rely on Excel to do the rest for you, you need to construct a routine that will interpret waht it sees on the last row on your database, then make decisions as to what needs to be done.

Now any self-respecring developer will know a few routines to detect if a cell (and ultimately a row) has any contetns at all. This must be done through a loop that will not end up overloading your Page File thus crashing your machine since Excel is too fragile to be kept in the bin that long if you know what I mean.

When this routine has done this, you should then have it see (through th euse of flags) whether it should proceed to use the current row or move on to the next one.

You problem I may invisige is that you can't figure out how to get it to work indeffinetely alongside the user without doing crap.
You will find a solution to this problem by getting over the idea that you need to solve all the problem at one fell swoop.

Section the problem, even inside the subroutine itself.

Goodluck, glad to see females doing programming. I wish more got into the habbit.

Aks again, maybe then i can give you code samples instead of now when I am away from my personal work station.

Reply With Quote
  #6  
Old December 7th, 2003, 11:20 AM
Sortaja Sortaja is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 Sortaja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking I need Help wiv code please :(

I am trying 2 get the code 4 name tags ice tried directx4Vb didnt work please will some1 help me thanx u

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Excel VB help


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


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





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