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


Hello, I am getting very annoyed with this poxy textbox I am doing
please can someone help me out!!!

On opening my userform, my textbox (date1.text) populates with the dat
which is in column A of the active row.

On closing my userform, my textbox puts whatever is in the date1.tex
box into the cell in column A of the same active row.

My problem is that I open the sheet and the box says "20-Jul-05",
then hit my update command button and the form closes. When I go t
open the userform using the same row VB says "Run-time error '13': Typ
Mismatch".


My only code is:
Private Sub UserForm_Initialize()
Date1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 1)
-----------------------------------------------------------------------------------

Private Sub EnterIssue_click()
ActiveCell.Offset(0, -ActiveCell.Column + 1) = Date1.Text

Can anybody help with this please, I would be really grateful!!

--
johncassel
-----------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501
View this thread: http://www.excelforum.com/showthread.php?threadid=38867

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Date Type Mismatch

Are you sure that is the only code? I cannot reproduce the.error

--
HTH

Bob Phillips

"johncassell"
wrote in message
...

Hello, I am getting very annoyed with this poxy textbox I am doing,
please can someone help me out!!!

On opening my userform, my textbox (date1.text) populates with the date
which is in column A of the active row.

On closing my userform, my textbox puts whatever is in the date1.text
box into the cell in column A of the same active row.

My problem is that I open the sheet and the box says "20-Jul-05", I
then hit my update command button and the form closes. When I go to
open the userform using the same row VB says "Run-time error '13': Type
Mismatch".


My only code is:
Private Sub UserForm_Initialize()
Date1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 1)
--------------------------------------------------------------------------

---------

Private Sub EnterIssue_click()
ActiveCell.Offset(0, -ActiveCell.Column + 1) = Date1.Text

Can anybody help with this please, I would be really grateful!!!


--
johncassell
------------------------------------------------------------------------
johncassell's Profile:

http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=388676



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Type Mismatch


This is the whole version of my code (I assumed the bit I posted was th
only bits which needed inspection). Thanks for the reply

Private Sub UserForm_Initialize()
Date1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 1)
JobNumber1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 2)
BinNumber1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 3)
Description1 = ActiveCell.Offset(0, -ActiveCell.Column + 4)
NumberIssued1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 5)
TotalCost1 = "£" & ActiveCell.Offset(0, -ActiveCell.Column + 6)
CostPerUnit1 = "£" & TotalCost1 / NumberIssued1.Text
TotalCharge1 = Format(ActiveCell.Offset(0, -ActiveCell.Column + 7)
"£###,###.00")
ChargePerUnit1 = TotalCharge1 / NumberIssued1.Text
CurrentStockLevel1 = (WorksheetFunction.VLookup(BinNumber1.Value, _
Worksheets("Current Stock").Range("A:E"), 5, False))
ReorderLevel1 = (WorksheetFunction.VLookup(BinNumber1.Value, _
Worksheets("Current Stock").Range("A:J"), 10, False))
BinNumber1.RowSource = _
ThisWorkbook.Sheets("curren
stock").Range("a:b").Address(external:=True)

End Sub

Private Sub EnterIssue_click()
ActiveCell.Offset(0, -ActiveCell.Column + 1) = Date1.Value
ActiveCell.Offset(0, -ActiveCell.Column + 2) = JobNumber1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 3) = BinNumber1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 4) = Description1
ActiveCell.Offset(0, -ActiveCell.Column + 5) = NumberIssued1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 6) = TotalCost1
ActiveCell.Offset(0, -ActiveCell.Column + 7) = TotalCharge1
End Su

--
johncassel
-----------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501
View this thread: http://www.excelforum.com/showthread.php?threadid=38867

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Date Type Mismatch

Sorry, I still cannot reproduce the problem.

--
HTH

Bob Phillips

"johncassell"
wrote in message
...

This is the whole version of my code (I assumed the bit I posted was the
only bits which needed inspection). Thanks for the reply

Private Sub UserForm_Initialize()
Date1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 1)
JobNumber1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 2)
BinNumber1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 3)
Description1 = ActiveCell.Offset(0, -ActiveCell.Column + 4)
NumberIssued1.Text = ActiveCell.Offset(0, -ActiveCell.Column + 5)
TotalCost1 = "£" & ActiveCell.Offset(0, -ActiveCell.Column + 6)
CostPerUnit1 = "£" & TotalCost1 / NumberIssued1.Text
TotalCharge1 = Format(ActiveCell.Offset(0, -ActiveCell.Column + 7),
"£###,###.00")
ChargePerUnit1 = TotalCharge1 / NumberIssued1.Text
CurrentStockLevel1 = (WorksheetFunction.VLookup(BinNumber1.Value, _
Worksheets("Current Stock").Range("A:E"), 5, False))
ReorderLevel1 = (WorksheetFunction.VLookup(BinNumber1.Value, _
Worksheets("Current Stock").Range("A:J"), 10, False))
BinNumber1.RowSource = _
ThisWorkbook.Sheets("current
stock").Range("a:b").Address(external:=True)

End Sub

Private Sub EnterIssue_click()
ActiveCell.Offset(0, -ActiveCell.Column + 1) = Date1.Value
ActiveCell.Offset(0, -ActiveCell.Column + 2) = JobNumber1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 3) = BinNumber1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 4) = Description1
ActiveCell.Offset(0, -ActiveCell.Column + 5) = NumberIssued1.Text
ActiveCell.Offset(0, -ActiveCell.Column + 6) = TotalCost1
ActiveCell.Offset(0, -ActiveCell.Column + 7) = TotalCharge1
End Sub


--
johncassell
------------------------------------------------------------------------
johncassell's Profile:

http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=388676



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
Type Mismatch on some PCs Delboy Excel Programming 8 January 17th 05 11:37 AM
Type Mismatch teresa Excel Programming 10 December 28th 04 10:14 PM
Type mismatch teresa Excel Programming 1 December 14th 04 11:19 PM
Date type mismatch Patti[_2_] Excel Programming 4 September 14th 04 05:15 PM
Type Mismatch on Date Cameron[_4_] Excel Programming 2 December 5th 03 01:56 PM


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