Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Alpha Numerics bunch together

Hi,

When I type code the alpha numerics sometimes bunch together and the font
changes to red as in the case below. As in For i =1To2 and Nexti .

Sub CopyDemand()
Dim i As Integer
For i =1To2
Sheets("Demand").Select
ActiveCell.Offset(0, 2).Activate
ActiveCell.Copy
Sheets("Demand1").Activate
ActiveCell.Offset(0, 1).Activate
ActiveCell.PasteSpecial
Nexti
End Sub

Being a newbie at VBA programming I am sure there is a very simple
explanation for this.

Please will someone tell me what is happening.

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Alpha Numerics bunch together

Hi Rob,

Just insert some spaces between the words/numbers. VBA thinks it is one
string when the delimiter spaces are not included.

Example
For i = 1 To 2

With some code like endif VBA is smart enough to insert the spaces for you
and change it to End If but this does necessarily occur with all code.


--
Regards,

OssieMac


"Rob" wrote:

Hi,

When I type code the alpha numerics sometimes bunch together and the font
changes to red as in the case below. As in For i =1To2 and Nexti .

Sub CopyDemand()
Dim i As Integer
For i =1To2
Sheets("Demand").Select
ActiveCell.Offset(0, 2).Activate
ActiveCell.Copy
Sheets("Demand1").Activate
ActiveCell.Offset(0, 1).Activate
ActiveCell.PasteSpecial
Nexti
End Sub

Being a newbie at VBA programming I am sure there is a very simple
explanation for this.

Please will someone tell me what is happening.

Thank you.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I sort alpha neumeric fields that have an alpha suffix? Bob Sparks Excel Worksheet Functions 3 May 31st 09 05:17 AM
How do I sort differeing types of data into different numerica va Big Trev Excel Discussion (Misc queries) 1 April 7th 07 05:14 PM
Change a letter grade to a numerica GPA Bogazetti Excel Discussion (Misc queries) 3 September 13th 06 08:22 PM
The colums changed from alpha to numeric how do you make it alpha worldmade Excel Discussion (Misc queries) 2 May 26th 05 03:44 PM
Combining Non-numerica data from multiple sources John Jost Excel Programming 2 November 12th 04 09:35 PM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"