Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: Macro

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Macro
holy41 09.07.2006 03:52:01
How do i put formulas in macro for my workBook cells B6,H6,K6,L6,M6,N6,O6?
I will take the formulas out of the workBook and use a timmer function.
Sub StartTimer()
'
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
How do i put the cells in this timmer program Can you help? So if the
macro are disable in windows program the workBook program won't run. thank Ken
Thank Ken
RE: Macro
JLatham 10.07.2006 20:18:02
I'm not quite sure what you're trying to achieve here. But the general way
to reference a cell or range from within VB code is as

Worksheets("NameOfSheet").Range("CellRange")
CellRange can be a single cell as A1 or a range such as "A1:A10" or "A1:C99"
You have to include the double-quotes as I've shown.

There are several properties available at that point like .Value (default)
..Row, .Column etc.

You may use such a reference on either side of the = statement where it is
logically acceptable. For instance:
WhatRow = Worksheets("Sheet1").Range("A9").Row
would assign 9 to the variable WhatRow

But
Worksheets("Sheet1").Range("A9").Row = WhatRow
won't work because you're trying to change something that can't be changed
(the row that cell A9 is on).

You realize that if you Macro Security is set to HIGH or if it is at Medium
and a person elects not to allow macros to run then no code will run. If
they open the workbook with the [Shift] key held down, then no macros
associated with opening the workbook will run either.

"holy41" wrote:

[Quoted Text]
> How do i put formulas in macro for my workBook cells B6,H6,K6,L6,M6,N6,O6?
> I will take the formulas out of the workBook and use a timmer function.
> Sub StartTimer()
> '
> RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
> Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
> schedule:=True
> End Sub
> How do i put the cells in this timmer program Can you help? So if the
> macro are disable in windows program the workBook program won't run. thank Ken
> Thank Ken
RE: Macro
holy41 11.07.2006 00:54:01
Hello

I think this will work i using a usb Key made anothe macro to check the key
when in and out it will shut the program down if you take the key out and
won't run if it is not in. If macro are disable the key won't work. so if the
formulas ane in the macro then the program will run if the macro are shut
down.

Thank Ken
Latham" wrote:

[Quoted Text]
> I'm not quite sure what you're trying to achieve here. But the general way
> to reference a cell or range from within VB code is as
>
> Worksheets("NameOfSheet").Range("CellRange")
> CellRange can be a single cell as A1 or a range such as "A1:A10" or "A1:C99"
> You have to include the double-quotes as I've shown.
>
> There are several properties available at that point like .Value (default)
> .Row, .Column etc.
>
> You may use such a reference on either side of the = statement where it is
> logically acceptable. For instance:
> WhatRow = Worksheets("Sheet1").Range("A9").Row
> would assign 9 to the variable WhatRow
>
> But
> Worksheets("Sheet1").Range("A9").Row = WhatRow
> won't work because you're trying to change something that can't be changed
> (the row that cell A9 is on).
>
> You realize that if you Macro Security is set to HIGH or if it is at Medium
> and a person elects not to allow macros to run then no code will run. If
> they open the workbook with the [Shift] key held down, then no macros
> associated with opening the workbook will run either.
>
> "holy41" wrote:
>
> > How do i put formulas in macro for my workBook cells B6,H6,K6,L6,M6,N6,O6?
> > I will take the formulas out of the workBook and use a timmer function.
> > Sub StartTimer()
> > '
> > RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
> > Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
> > schedule:=True
> > End Sub
> > How do i put the cells in this timmer program Can you help? So if the
> > macro are disable in windows program the workBook program won't run. thank Ken
> > Thank Ken

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net