Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Variable Decleration

I tried "DIM A$ AS STRING" which produced an error.

1) How do you initalize/define a string variable?

2) What is the proper way to initalize all other types of variables?

3) Does VBA really restrict things to integers, bytes, boolean expressions,
etc, or are they still variants?

Thanks in advance,

Christmas May
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Variable Decleration

Here is everything you ever wanted to know about delcaring variables...

http://www.cpearson.com/excel/variables.htm

You will run into difficulty because of the use of the $ sign...

dim a as string
or
dim a$

Either of which will declare a string.
--
HTH...

Jim Thomlinson


"Christmas May" wrote:

I tried "DIM A$ AS STRING" which produced an error.

1) How do you initalize/define a string variable?

2) What is the proper way to initalize all other types of variables?

3) Does VBA really restrict things to integers, bytes, boolean expressions,
etc, or are they still variants?

Thanks in advance,

Christmas May

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Variable Decleration

Mr. Jim Thomlinson,

1) Thanks for the link!

2) Thanks for the assistance with string variables. (Darn Quickbasic 4.0
habits)

3) I'm considering this matter closed, unless someone else wishes to add
commentary.

Sincerely,

Christmas May



"Jim Thomlinson" wrote:

Here is everything you ever wanted to know about delcaring variables...

http://www.cpearson.com/excel/variables.htm

You will run into difficulty because of the use of the $ sign...

dim a as string
or
dim a$

Either of which will declare a string.
--
HTH...

Jim Thomlinson


"Christmas May" wrote:

I tried "DIM A$ AS STRING" which produced an error.

1) How do you initalize/define a string variable?

2) What is the proper way to initalize all other types of variables?

3) Does VBA really restrict things to integers, bytes, boolean expressions,
etc, or are they still variants?

Thanks in advance,

Christmas May

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
Run-Time error '91': Object variable of With block variable not set jammin1911 Excel Programming 3 June 6th 06 06:36 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


All times are GMT +1. The time now is 01:11 AM.

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"