Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default Range < - String conversion.

Is there an automatic conversion?
I must ask the user for a range but the input box returns a string.

I check for "conversion" inside VBA help and I find out nothing.

Thanks Alex.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Range < - String conversion.

Hi
use the application.inputbox with the type:=8. e.g.

Sub foo()
....
Dim aralik As Range
On Error Resume Next
Set aralik = Application.InputBox(prompt:="Select range:", Type:=8)
If Err < 0 Then
Exit Sub
End If
On Error GoTo 0
' your code
....
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"y" schrieb im Newsbeitrag
...
Is there an automatic conversion?
I must ask the user for a range but the input box returns a string.

I check for "conversion" inside VBA help and I find out nothing.

Thanks Alex.


  #3   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default Range < - String conversion.

Hi Frank,

thanks for your tips.

Just a question:

why Set aralik = Application.Inp... ? and not aralik = Application.Inp...

Alex.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Range < - String conversion.

Hi
you want to get a range (which is an object) For object assignments you
nee set.
e.g. the following won't work:
dim rng as range
rng = range ("A1:A2")

but the following will
dim rng as range
set rng = range ("A1:A2")

--
Regards
Frank Kabel
Frankfurt, Germany

"y" schrieb im Newsbeitrag
...
Hi Frank,

thanks for your tips.

Just a question:

why Set aralik = Application.Inp... ? and not aralik =

Application.Inp...

Alex.



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
String formula conversion Erik Excel Discussion (Misc queries) 1 February 13th 10 01:09 AM
Prevent conversion of numeric text string to scientific notation StuckWithExcelAlas Excel Discussion (Misc queries) 1 December 28th 07 07:02 PM
String to Variant incorrect conversion Paul Excel Worksheet Functions 1 October 4th 07 01:11 AM
date range conversion tssjhs Excel Discussion (Misc queries) 3 March 22nd 05 04:51 PM
String to Array Conversion Ussiddiqui[_14_] Excel Programming 1 January 31st 04 10:04 AM


All times are GMT +1. The time now is 01:32 AM.

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"