Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am writing a macro to call another sub. One of the argument that I pass to the other sub is a range object. I just found that if the range has content, value of the variable will become to the value of the range. In my case, if the range("A4") store a string "ABC", then the variable PasteAt="ABC". This will result in error when the other sub is going to paste data of recordset at a specific range. Can you tell me how to solve this problem? Your help will be appreciated. The following is my coding. Sub main() Dim Server As String, Database As String, SQLcommand As String, PasteAt As Range Server = "SBS-2003" Database = "Data-03" Set PasteAt = Range("A4") .... .... Call GetData(Server, Database, SQLcommand, PasteAt) .... .... End Sub Sub GetData(Svr As String, Db As String, SqlCmd As String, Pste As Range) .... .... End Sub Billy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range object evaluates to Range.value, or Range object | Excel Programming | |||
returning pivottable object from a range object | Excel Programming | |||
Range object to Array object conversion | Excel Programming | |||
Range object to Array object conversion | Excel Programming | |||
Range object to Array object conversion | Excel Programming |