#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default Macro

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, procedu=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
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,203
Default Macro

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, procedu=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

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default Macro

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:

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, procedu=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

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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 05:26 PM.

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

About Us

"It's about Microsoft Excel"