LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default Variable types

Hi,

I'm a bit of a dabbler with VBA, I use a combination of recorded code,
snippets from the web and user groups and (thankfully) code supplied in
answers here.
At the moment I'm trying to learn a bit about referring to ranges as I'm
hoping to use Offset in some work. The site I'm looking at is
http://spreadsheetpage.com/index.php...your_vba_code/

I'm totally confused about variables and DIM statements but understand the
reasons for using Option Explicit (I hope).

So my problem is that I've copied a bit of code from the website and don't
know how to dim the variables. I could spend all day trying various different
things but I was hoping that if I came here I could get some help and maybe
someone could explain the why of it too.

Here's the code

Sub FillRange2()
Num = 1
For Row = 0 To 9
For Col = 0 To 9
Sheets("Sheet1").Range("A1").Offset(Row,Col).Value = Num
Num = Num + 1
Next Col
Next Row
End Sub

Many thanks


 
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 can I hide unused file types from file types list in save dial Estra Q Excel Discussion (Misc queries) 1 December 17th 09 12:36 PM
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" roadsidetree Charts and Charting in Excel 15 June 2nd 09 10:53 AM
Assign a single variable to an Array filled with same data types RyanH Excel Programming 7 July 21st 08 09:05 PM
Variable Types Robin Clay[_3_] Excel Programming 4 August 13th 04 12:26 PM
VB6 to VBA conversion. Form vs. UserForm differences. Object variable types Rick Labs Excel Programming 2 May 4th 04 11:36 PM


All times are GMT +1. The time now is 02:34 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"