Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Converting Range.value(error)

Could some one tell me if this is correct. I am getting a run Time
error on the second line


Dim intNumOfProducts as Integer

intNumOfProducts = CInt(Range("B1").Value)


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Converting Range.value(error)

It looks ok to me, but what's in B1?

maybe:

If IsNumeric(Range("b1").Value) Then
intnumofproducts = CInt(Range("b1").Value)
Else
MsgBox "It's not a number! " & Range("b1").Value
End If


vikrampn wrote:

Could some one tell me if this is correct. I am getting a run Time
error on the second line

Dim intNumOfProducts as Integer

intNumOfProducts = CInt(Range("B1").Value)

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
converting to xlsx error jon New Users to Excel 0 October 13th 09 07:42 PM
I get a Format error when converting my yahoo contacts to CSV file Top agent needs importing csv help Excel Discussion (Misc queries) 1 February 9th 09 04:02 PM
Converting a Grid (or range) of Data to a List a Excel Worksheet Functions 1 April 12th 07 10:14 PM
help converting text to range object jimredfield Excel Programming 3 October 10th 03 07:02 PM
Converting a range to string Robert Stober Excel Programming 1 October 3rd 03 09:39 PM


All times are GMT +1. The time now is 10:36 PM.

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"