Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default some simple (?) simulation

Hi,
do some know how to simulate in VBA operation known in C as ++i, it's
mean add to the same variable

The Best

Lesio
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default some simple (?) simulation

Hi

Maybe i = i + 1 ?

Regards,
Per

"LesioB1" skrev i meddelelsen
...
Hi,
do some know how to simulate in VBA operation known in C as ++i, it's mean
add to the same variable

The Best

Lesio


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default some simple (?) simulation

There is no direct equivalent, but just use

i =i+1

2 extra characters

--

Regards,
Nigel




"LesioB1" wrote in message
...
Hi,
do some know how to simulate in VBA operation known in C as ++i, it's mean
add to the same variable

The Best

Lesio


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default some simple (?) simulation

Perhaps

i = i + i

Mike

"LesioB1" wrote:

Hi,
do some know how to simulate in VBA operation known in C as ++i, it's
mean add to the same variable

The Best

Lesio

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default some simple (?) simulation

Per Jessen pisze:
Hi

Maybe i = i + 1 ?

Regards,
Per

"LesioB1" skrev i meddelelsen
...
Hi,
do some know how to simulate in VBA operation known in C as ++i, it's
mean add to the same variable

The Best

Lesio



Per
in above (describe by you) case you get implade on recurrence call and
this is the point.

LesioB1


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default some simple (?) simulation

Not sure what the purpose of your idea is, but how about:

Sub PlusPlus(lVar As Long)
lVar = lVar + 1
End Sub

Sub test()

Dim i As Long

PlusPlus i
MsgBox i

End Sub


RBS


"LesioB1" wrote in message
...
Hi,
do some know how to simulate in VBA operation known in C as ++i, it's mean
add to the same variable

The Best

Lesio


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default some simple (?) simulation



HI
ok I try to explain in more details:
The case is: in cell A1 there is value. In the next cell B1 I try
insert function which check this value and if the condition is True try
to increase it by 1 ( if A1 < X then ++A1). There is some kind of counter
Excel complain about recurrency.

regards
LesioB1

RB Smissaert pisze:
Not sure what the purpose of your idea is, but how about:

Sub PlusPlus(lVar As Long)
lVar = lVar + 1
End Sub

Sub test()

Dim i As Long

PlusPlus i
MsgBox i

End Sub


RBS


"LesioB1" wrote in message
...
Hi,
do some know how to simulate in VBA operation known in C as ++i, it's
mean add to the same variable

The Best

Lesio


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
VBA help for simulation Mike B. Excel Programming 1 June 24th 08 07:30 PM
Help with simple 1-D motion simulation Jeff Ciaccio Excel Programming 2 June 18th 08 01:43 PM
Simulation Sherif Excel Programming 14 December 28th 07 09:56 AM
I need to set up a simulation Janet Excel Programming 2 July 6th 07 07:04 PM
I need to set up a simulation Janet Setting up and Configuration of Excel 1 July 6th 07 06:13 PM


All times are GMT +1. The time now is 06:31 PM.

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

About Us

"It's about Microsoft Excel"