473,609 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the Next alphabet...in vb6

58 New Member
Hi all

I am working on excel, Macros with vb6....When I was writing the for loop I got stuck with getting the next alphabet...Like I need to extract the data from a database and I need to split that data in to equal parts and each part should go to diff column in the excel sheet like A, B, C, D.....Z
if you look at the code

For n = 0 To 20
Avg = (ls - ks) / qs
n = n + 1
Range("A" & (ks + ((n - 1) * Avg) + 1) & ": A" & (ks + (n * Avg))).Select
Selection.Copy
Sheets("Sheet3" ).Select
Range("A1").Sel ect
ActiveSheet.Pas te
Sheets("Subtest ").Select
Next
in the code if you look at the Bold letters...and when the loop is running I need the Next alphabet in the place of A i.e. B,C,D,E...Z like that it should go...

Can you please help me in this case...fast reply would be of gr8 help...

thnq

Regards
Jul 30 '09 #1
3 3074
ubentook
58 New Member
Replace...
Range("A1").Sel ect

With...
Cells(Rows.Coun t, 1).End (xlup).Offset(1 , 0).Select
Aug 1 '09 #2
sivadhanekula
58 New Member
thnq for the reply...

when I replace the line with the mentioned line the output stays only in one column...i.e. in column A...but I want the partition in different columns like A, B, C, D....Z
For n = 1 To 20
n = n + 1
Range("A" & (ks + ((n - 1) * Avg) + 1) & ": A" & (ks + (n * Avg))).Select
Selection.Copy
Sheets("Sheet3" ).Select
Cells(Rows.Coun t, 1).End(xlUp).Of fset(1, 0).Select
ActiveSheet.Pas te
Sheets("Subtest ").Select
Next
Aug 4 '09 #3
ubentook
58 New Member
It works for me in Excel 2002...
If four adjoining cells are copied then the paste occurs in four adjoining cells.
Aug 4 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6647
by: Stefan Krah | last post by:
Hello, I am currently writing code where it is convenient to convert char to int . The conversion function relies on a character set with contiguous alphabets. int set_mesg(Key *key, char *s) { char *x;
8
3253
by: Jack Addington | last post by:
I want to scroll through the alphabet in order to scroll some data to the closest name that starts with a letter. If the user hits the H button then it should scroll to the letter closest to H. If no one exists with H, then go to I, etc. If its near the end, say 'V', and the last person is a 'T' then it should work its way back up the alphabet. I was trying to loop as if the Char's were ints but I am having problems I have buttons...
9
11217
by: booksnore | last post by:
I am writing some code to search for strings that contain every letter of the alphabet. At the moment I am using the method below to check to see if a string contains every letter of the alphabet. I wanted to use a regular expression but I could not find an ‘AND’ operator within the regular expression – so I need something like match true if string contains ‘a’ and ‘b’ and ‘c’ and ‘d’ ..etc,etc. If anyone has any thoughts on how I can...
31
2652
by: Joe Smith | last post by:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" " " "!#%^&*()-_" "+=~\|;:\'" "\"{},.<>/\?" "\a\b\f\n\r\t\v\\" Do the above string literals comprise an alphabet for C? joe
0
2964
by: rockdale | last post by:
Hi, all: I implemented an alphabet list so that when user click letter A then I will re-bind a gridview control using SQL stored procedure. It works fine. The problem is I populate my alphabet repeater by select the ini of name from database. So that my alphabet does not have 26 letters, my customer does not like it since it may spell something bad. Now I am trying to display 26 letters, letters that exist in my database will be...
6
5534
by: new2script | last post by:
Hi, I'm very new to c++. I need to write a prgrm that convert each character received into the next character in the alphabet. As a special case convert z to a. Here what I wrote so far. appreciate your suggestions. Thanks #include <iostream> using namespace std; int main(void)
1
1767
by: kannabiran | last post by:
Hi, Im using C# ASP.Net here in the textbox i need to get the input as like follows ,any alphabet or any alphabet,any alphabet for example ,C or C,E like this i want to get the input.The textbox should get only one comma and it should not get any other special characters.it can be either by server side code or by the java script code..How should i do this any assistance plz.. rgrds
12
2972
by: paitoon | last post by:
Hi, I got a little bit problem about search result in my site. When i put the keyword and click on search ....everything work fine i got the correct result but they not order by the keyword,but they order by the alphabet.....some and the problem is happen sure if there are many result to display...the real result that people put keyword for will be in the last page...because the computer order by the alphabet. for example...i put the keyword...
20
19019
by: geebanga88 | last post by:
HI i have a method that is supose to store the alphabet in an array however dont think that it is being added to the array. public static void GetAlphabet (char alphabet) { int index, ordinalVal = 97; char element; for (index = 1; index < alphabet.length; ++index, ++ordinalVal) { element = (char) ordinalVal;
0
8588
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8410
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6068
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5526
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2541
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1690
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.