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

I am trying to return a simple week number based on the value input on a user
form and place the value in a work sheet column.

I have tried the WeekNum formula but it gives me "Compile Error: Sub or
Function Not defined"

I have the Analysis ToolPak installed.

I am using a "pop-up" calendar to input the date for this field. Would that
cause the problem perhaps????

The Macro posts all the values of the userform to the last row of the spread
sheet. I want a column that simple adds in a week number. Nothing fancy. The
code that gives me the error is as follows:

'Determine the next empty row
NextRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Row

'Transfer Data
Cells(NextRow, 5) = QCMonitor.RevLast.Value
Cells(NextRow, 6) = QCMonitor.RevFirst.Value
Cells(NextRow, 7) = QCMonitor.Dept.Value
Cells(NextRow, 8) = QCMonitor.RevDate.Value
Cells(NextRow, 9) = QCMonitor.AcctNumber.Value

'Input values for house-keeping cells
Cells(NextRow, 1) = 1
Cells(NextRow, 2) = Format(QCMonitor.RevDate.Value, "mmm")
Cells(NextRow, 3) = WeekNum(QCMonitor.RevDate.Value, 1)
Cells(NextRow, 4) = Year(QCMonitor.RevDate.Value)

Everything works but the WeekNum Formula, the answer is probably very
simple, but I have tried numberous other formulas without success.

Ideas anybody?

WillRn

I

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default WeekNum Trouble

Hi will

Tools Add-ins and also install Analysis ToolPak VBA
In the VBA editor go to ToolsReferences and select atpvbaen.xla

--
Regards Ron de Bruin
http://www.rondebruin.nl


"WillRn" wrote in message ...
I am trying to return a simple week number based on the value input on a user
form and place the value in a work sheet column.

I have tried the WeekNum formula but it gives me "Compile Error: Sub or
Function Not defined"

I have the Analysis ToolPak installed.

I am using a "pop-up" calendar to input the date for this field. Would that
cause the problem perhaps????

The Macro posts all the values of the userform to the last row of the spread
sheet. I want a column that simple adds in a week number. Nothing fancy. The
code that gives me the error is as follows:

'Determine the next empty row
NextRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Row

'Transfer Data
Cells(NextRow, 5) = QCMonitor.RevLast.Value
Cells(NextRow, 6) = QCMonitor.RevFirst.Value
Cells(NextRow, 7) = QCMonitor.Dept.Value
Cells(NextRow, 8) = QCMonitor.RevDate.Value
Cells(NextRow, 9) = QCMonitor.AcctNumber.Value

'Input values for house-keeping cells
Cells(NextRow, 1) = 1
Cells(NextRow, 2) = Format(QCMonitor.RevDate.Value, "mmm")
Cells(NextRow, 3) = WeekNum(QCMonitor.RevDate.Value, 1)
Cells(NextRow, 4) = Year(QCMonitor.RevDate.Value)

Everything works but the WeekNum Formula, the answer is probably very
simple, but I have tried numberous other formulas without success.

Ideas anybody?

WillRn

I



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default WeekNum Trouble

I have that one installed also . . . : (

"Ron de Bruin" wrote:

Hi will

Tools Add-ins and also install Analysis ToolPak VBA
In the VBA editor go to ToolsReferences and select atpvbaen.xla

--
Regards Ron de Bruin
http://www.rondebruin.nl


"WillRn" wrote in message ...
I am trying to return a simple week number based on the value input on a user
form and place the value in a work sheet column.

I have tried the WeekNum formula but it gives me "Compile Error: Sub or
Function Not defined"

I have the Analysis ToolPak installed.

I am using a "pop-up" calendar to input the date for this field. Would that
cause the problem perhaps????

The Macro posts all the values of the userform to the last row of the spread
sheet. I want a column that simple adds in a week number. Nothing fancy. The
code that gives me the error is as follows:

'Determine the next empty row
NextRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Row

'Transfer Data
Cells(NextRow, 5) = QCMonitor.RevLast.Value
Cells(NextRow, 6) = QCMonitor.RevFirst.Value
Cells(NextRow, 7) = QCMonitor.Dept.Value
Cells(NextRow, 8) = QCMonitor.RevDate.Value
Cells(NextRow, 9) = QCMonitor.AcctNumber.Value

'Input values for house-keeping cells
Cells(NextRow, 1) = 1
Cells(NextRow, 2) = Format(QCMonitor.RevDate.Value, "mmm")
Cells(NextRow, 3) = WeekNum(QCMonitor.RevDate.Value, 1)
Cells(NextRow, 4) = Year(QCMonitor.RevDate.Value)

Everything works but the WeekNum Formula, the answer is probably very
simple, but I have tried numberous other formulas without success.

Ideas anybody?

WillRn

I




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default WeekNum Trouble

Well, . . .Now that i've decided to read the post, . . . I saw the part about
adding in the atpvbaen.xla.

It works now,

Much thanks!

"Ron de Bruin" wrote:

Hi will

Tools Add-ins and also install Analysis ToolPak VBA
In the VBA editor go to ToolsReferences and select atpvbaen.xla

--
Regards Ron de Bruin
http://www.rondebruin.nl


"WillRn" wrote in message ...
I am trying to return a simple week number based on the value input on a user
form and place the value in a work sheet column.

I have tried the WeekNum formula but it gives me "Compile Error: Sub or
Function Not defined"

I have the Analysis ToolPak installed.

I am using a "pop-up" calendar to input the date for this field. Would that
cause the problem perhaps????

The Macro posts all the values of the userform to the last row of the spread
sheet. I want a column that simple adds in a week number. Nothing fancy. The
code that gives me the error is as follows:

'Determine the next empty row
NextRow = Range("A" & Rows.Count).End(xlUp).Offset(1).Row

'Transfer Data
Cells(NextRow, 5) = QCMonitor.RevLast.Value
Cells(NextRow, 6) = QCMonitor.RevFirst.Value
Cells(NextRow, 7) = QCMonitor.Dept.Value
Cells(NextRow, 8) = QCMonitor.RevDate.Value
Cells(NextRow, 9) = QCMonitor.AcctNumber.Value

'Input values for house-keeping cells
Cells(NextRow, 1) = 1
Cells(NextRow, 2) = Format(QCMonitor.RevDate.Value, "mmm")
Cells(NextRow, 3) = WeekNum(QCMonitor.RevDate.Value, 1)
Cells(NextRow, 4) = Year(QCMonitor.RevDate.Value)

Everything works but the WeekNum Formula, the answer is probably very
simple, but I have tried numberous other formulas without success.

Ideas anybody?

WillRn

I




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
weeknum reno Excel Discussion (Misc queries) 1 June 20th 08 01:20 PM
weeknum reno Excel Discussion (Misc queries) 2 May 15th 08 11:56 PM
WEEKNUM RonB Excel Worksheet Functions 3 April 12th 06 11:37 AM
Weeknum Mike D. Excel Worksheet Functions 4 February 14th 06 08:44 PM
WEEKNUM() Ciara Excel Discussion (Misc queries) 5 April 13th 05 12:09 PM


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