ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   The Most Simple Question Ever (https://www.excelbanter.com/excel-programming/399804-most-simple-question-ever.html)

Angyl

The Most Simple Question Ever
 
Hi, I'm not exatly new to VBasic, I've spent some time working with it in
Word (forms) but NEVER in Excel, and now it's time for me to get started
knowing how to work in Excel.

So the basic question is, how do I reference cells in vBasic (Excel?)

For example, how would I write:

If (cell A1) = "test" Then
(cell D24) = "It worked!"

This fundamental knowledge along with what I know from Word ought to be
enough to get me started on some projects...

Thanks!

JE McGimpsey

The Most Simple Question Ever
 
XL cells are Range Objects. One way:

If Range("A1").Value = "test" Then _
Range("D24").Value = "It worked"

An alternative:

If Cells(1, 1).Text = "test" Then _
Cells(24, 4).Value = "It worked"

In article ,
Angyl wrote:

Hi, I'm not exatly new to VBasic, I've spent some time working with it in
Word (forms) but NEVER in Excel, and now it's time for me to get started
knowing how to work in Excel.

So the basic question is, how do I reference cells in vBasic (Excel?)

For example, how would I write:

If (cell A1) = "test" Then
(cell D24) = "It worked!"

This fundamental knowledge along with what I know from Word ought to be
enough to get me started on some projects...

Thanks!


JLGWhiz

The Most Simple Question Ever
 
This site provides some pretty basic information. It will at least help you
to understand some of the conventions and the language.

http://www.excel-vba.com/excel-vba-contents.htm

"Angyl" wrote:

Hi, I'm not exatly new to VBasic, I've spent some time working with it in
Word (forms) but NEVER in Excel, and now it's time for me to get started
knowing how to work in Excel.

So the basic question is, how do I reference cells in vBasic (Excel?)

For example, how would I write:

If (cell A1) = "test" Then
(cell D24) = "It worked!"

This fundamental knowledge along with what I know from Word ought to be
enough to get me started on some projects...

Thanks!


Angyl

The Most Simple Question Ever
 
Thank you both!

"JLGWhiz" wrote:

This site provides some pretty basic information. It will at least help you
to understand some of the conventions and the language.

http://www.excel-vba.com/excel-vba-contents.htm

"Angyl" wrote:

Hi, I'm not exatly new to VBasic, I've spent some time working with it in
Word (forms) but NEVER in Excel, and now it's time for me to get started
knowing how to work in Excel.

So the basic question is, how do I reference cells in vBasic (Excel?)

For example, how would I write:

If (cell A1) = "test" Then
(cell D24) = "It worked!"

This fundamental knowledge along with what I know from Word ought to be
enough to get me started on some projects...

Thanks!



All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com