simple range problem

what am i doing wrong

dim myRange as Range
dim iNum as integer
iNum= 6

Set myRange = Cells(iNum + 2, 1)
myRange.Value = 34

trying to set a cell myRange to cell(8,1)
then putting the value 34 into the cell

0
arvindev (3)
11/22/2005 12:06:49 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
512 Views

Similar Articles

[PageSpeed] 43

I just tested with xl2002 and it worked fine but why not just
cells(inum+2,1)=34
or
cells(8,1)=34

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"cantonarv" <arvindev@gmail.com> wrote in message 
news:1132661208.982429.309000@g14g2000cwa.googlegroups.com...
> what am i doing wrong
>
> dim myRange as Range
> dim iNum as integer
> iNum= 6
>
> Set myRange = Cells(iNum + 2, 1)
> myRange.Value = 34
>
> trying to set a cell myRange to cell(8,1)
> then putting the value 34 into the cell
> 


0
Don
11/22/2005 1:49:38 PM
Reply:

Similar Artilces:

Copy Picture problems
I've written a macro which copies a selected range in Excel 2000 and and paste it as picture in Power Point. CopyPicture is used and the macro works OK apart from that all columns are not always included in the pasted picture. Grouped columns and selection of visible cells only is used in Excel. e.g from Range A1:Z15 12 visble columns are selected. A different number of columns can be included in the pasted picture when different users runs the macro. Thanks in advance for any help. Mats "MatsN" <MatsN@discussions.microsoft.com> wrote in message news:2A8F...

Problem about the data refer path.
Hi All, I do all the work on the network driver, says L:. For example, I have a excel file on the L driver, named XXX.xls. One field in the file is refer to a field in another file on the L driver in following path: L:\aaa\bbb\ccc.xls. But do not know when i find that this field in XXX.xls refer to a local file : C:\documents and setting\username\application data\microsoft\excel\xlstart\aaa\bbb\ccc.xls. Anybody who knows that problem, could help me. Thanks so much in advance!!!! Thanks a lot. Yue One way to handle this (if it's possible) is to have all of your related files in...

Big Problem Sending #2
Out of the blue on Thursday, Outlook stopped sending my email. It's just racking up in my outbox. I checked all the regular stuff several times (tools-accounts-servers- smtp) and that all seems correct. I even spent over an hour on the phone with SBC today, and they say the server is fine and tried some troubleshooting activities to try to help, to no avail. I'm losing my mind and I NEED HELP! I'm going to start losing clients if I can't get my email sent out. Please Help! (if no one can halp, can someone tell me who to ask or where to go to ask in Microsoft) I'm ...

any problems getting msnhotmail messages through outlooK?
I'm going away and want an out of office feature. I'm thinking of setting myself up through outlook but have msn hotmail. Are there any problems with doing this? Sandy Hirsch If you're a new hotmail 'customer' you wont be able to get your messages with Outlook. If you've had a hotmail account for at least a few months you should be able to get all your email with outlook. Its real simple, even easier than setting up a regular account. -James "Schwartz" <Schwartz@discussions.microsoft.com> wrote in message news:7B7EA122-7661-4350-8709-0376C1885EAC...

SmartList Builder problem with go to on SOP Entry
I've followed the steps from KB914894 to build a go to for the SOP Transaction Entry window. When that window opens it shows the SOP Type and SOP Number values that were passed and it shows the line item info but no other header info is shown. Any ideas? Additionally we have the Ship-To Address ID field disabled through Field Level Security for some users. When those users try to use this go to they get an error message about permissions on this field. Any options here? Thanks. -- Jim@TurboChef ------=_NextPart_0001_A4B6268B Content-Type: text/plain Content-Transfer-Encoding:...

Subscript Out of Range Error
The workbooks and macros used are being created in Excel 2007, but saved in the 97-2003 format. I have a macro that the boss will use to enter employees and place the names, date added, and count (sequential) into a worksheet. It loops in case there is more than one name to be added. NOTE: The boss will be in workbook(QA Master.xls) Once the boss is through entering names, the macro will then loop and create a workbook, copying the Workbook("QA Template.xls") and renaming it with the employee name that was entered. I don't know why, but I am getting the fol...

Unlocking named ranges
I am working with a spreadsheet created by a former employee. He used named ranges a lot. I am trying to understand the worksheet. When I see an equation in a cell like =Sum(Shipments) I feel I know what it means. But how do I learn what the actual cell reference is ie = Sum(D2:G2).? TIA Insert a new, empty worksheet into the workbook. Then you can use The Insert-> Name-> Paste menu option and click on the Paste List button to get a listing of all the names and the definitions "JohnL" wrote: > I am working with a spreadsheet created by a former employee. He used...

print only range that contain information in excel 2007
i have a large worksheet to cover a large number of possible inserted entries, all cells show blank until entries are copied and pasted in the worksheet. The amount of entries vary. Is there a way to set the workseet to print only the range of cells with information in them ...

Sure this is simple (date type prob)
Hi all, I have a cell with a date in it representing hours worked. eg 34:58 34 hours and 58 minutes. I need to multiply it by an hourly wage, e 4.52 and get the amount earned. Unfortuantely I do not know how to d this. Can anyone help? -- Cheers -- SO ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com where i5 is 34:58 and j4 is 4.50 = $157.35 =I5*24*$J$4 -- Don Guillett SalesAid Software donaldb@281.com "SOL-ion" <SOL-ion.x9rbb@excelforum-nospam.com>...

Windows 7 64 bit and shortcuts problem
Sometimes when I install a program, I try to make a desktop shortcut, but it wont appear on the desktop. I try to create one myself, but when I drag it to the desktop it seems to go into never, never land. What could cause this? Tony Tony, Please describe exactly what happens when you drag the exe file to the desktop so that we can think of a creative answer. I assume you are "right" dragging the exe to the desktop and choosing "create shortcut", right? What happens then? :) Carlos "Anthony Lisanti" wrote: > > > Some...

upgrade problems from 1.0 to 1.2
After upgrading from 1.0 to 1.2 CRM I now received the following error, see bottom of message. The upgrade seem to run smoothly - no visible errors. I noticed that the framework still shows 1.0 shouldn't it be 1.1? Server Error in '/' Application. ----------------------------------------------------------- --------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Me...

Data refresh problem
I downloaded an xl template worksheet which has links to MSN Money website (for updating stock prices) As I have xl97, and the worksheet was created in a later version, I saved it as a xl97 worksheet. When I 'refresh data' it downloads the latest prices.........sometimes. More usually I get the message 'xl has encountered a problem, and needs to close..' Any ideas on what might be causing this? If I knew how the link works, I could start with a new worksheet, but I can't find any web queries relating to this worksheet. Brickcounter Brickcounter, If you know where a...

Portfolio Manager the same old Problem
Hi After opening 2 tickets, number of unanswered emails and waiting for 2 months I still didn't received final respond from MS Tech Support. So much for free support. This is how we leaned ... See problem description below. This problem starts some where around Money 2003. I am thinking about going back from my 2006 version to 2003 or 2004 version. I found a couple of messages on this site, from people who had the same problem. Does any body know for sure, what was the last version that didn't have this problem - 2002, 2003, 2004, so I can try to reinstall it in place of 2006? Pr...

font printing problem of imported visio file inside power point file
I am having a problem with VISIO 2002 with PowerPoint 2000. I made a drawing with some fonts with VISIO 2002. Then I copied the drawing and pasted into PowerPoint file. In screen, I can clearly see the font. When I print the file, drawings are there but there are no font from printed paper. Would you please help me out regarding this problem? ...

Date range for report
Hi, I tried to set up controls in a form in order to prompt for date criteria in a report. I added textboxes to the report, with references to the forms controls, in the controlsources for those boxes. When I try to run the report it doesn't prompt for the dates, it just puts #Name? where those controls are. If I open the form and enter the dates directly into the form and click ok it brings up the report with the proper filters though. Is there a way to make the report open the form to prompt for the dates, rather than having to open the form itself? ...

Summing numbers between a date range
I need to sum values in a row of data where the date in the column of the row falls within a certain date range. Here is an example of the data. The data to be summed is in sheet one and the dates used for the criteria are in sheet 2. Sheet_1: col a col b col c col d Nov 15/92 Feb 15/93 Sep 15/93 Feb 15/94 15.00 20.00 30.00 10.00 Sheet_2: col a col b Jan 1/93 Dec 31/93 Jan 2/94 Dec 31/94 I basically want to sum the data in Sheet_1 that is between a date range based on Sheet_2. For example, sum values in sheet_...

GP10 Security Problem with HR
I have a user set up as HRDEFAULTUSER, HR MANAGER and HR STAKEHOLDER. When he tries to log in he gets a GET/CHANGE eoor on coProcess. And it says it can not perform operation in this security context. GP closes, but the user is added to the activity table. Where is the security setting for coProcess? ...

Exchange 2003 Security problems
Hi there, Can anyone please tell me what security permissions the exchange enterprise servers must have to Active Directory AND where I can look to verify that it is there? My 3 exchange servers loose there security rights and must do a domainprep every 8 hours to restore the security. I get the following on the exchange servers: Process STORE.EXE (PID=3456). Exchange Server sample.local does not have Audit Security Privilege on Domain Controller sample.local This Domain Controller will not be used by DSAccess. . PLEASE HELP?? Thanks Hens Hens You need to find out why this is happe...

Problem with hyperlink
Hi, When attempting to activate a web page using a hyperlink in Excel 2003, I get a message: "Opening"javascript:OWSize ("PR_Popup",http://racingpost.co.uk/horses/trainer_form.sd?trainer_id=693&code=Flat,620,480,'no','yes','yes')" Hyperlinks can be harmful to your computer data. To protect your computer, click only those hyperlinks from trusted sources. Do you want to continue. YES NO When I click YES a web page appears for a split second and then closes. I turned off Pop up blocker but this did not solve the problem. Why am I havi...

Problem with records affected
I'm inserting into a database and need to know the number of records that where entered and the number of errors, using this With CurrentDb .Execute strSQL_insert If Line_Number = 80 Then MsgBox (.RecordsAffected) End If If .RecordsAffected = 1 Then Good_Records = Good_Records + 1 Else Bad_Records = Bad_Records + 1 End If End With But the recordaffected comes out with 0. Thanks Suggestions: 1. Use a Database variable, so you can set it to Nothing again at the end. 2. Use dbFailOnError so you can...

problems with outlook 2003 #4
outlook 2003 keeps restarting, stating that it has encountered a problem and is restarting... any suggestions ? ...

Date Serial Problem
I have a querry in which I am using the Date Serial in the querry criteria as follows Between DateSerial([Enter Year:],[Enter Month:],1) And DateSerial([Enter Year:],[Enter Month:]+1,0) the result i get is for a a perticular month in a year. What I want is: 1. if i want to get the results between june to november 2009. how can i do it? 2. If i want to get the restult of 2008 only e.g. from 01 Jan 2008 (or any year) upto 31 December 2008. This should give result only for 1 year only. not by months like from june 2008 to june 2009 Please help me fix this querry ...

Outlook 2003 Sent item problem
My problem is I can send a new message, it goes to the outbox, it is not assigned a date, when send recieve is carried out it does not go. If I forward this same message it transmits properly. What are your send/receive settings for this account? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Greg D asked: | My problem is I can send a new message, it goes to the...

Chart 'crowding' problem. Chart suddenly overlaps axis text.
My manager created several chart sheets on his system (currently Windows 2000, Excel 2002 I'm pretty sure...he's in a meeting so I can't get his SP#). The charts look good, have a couple added lines to split the quarter visually into three months (the X-axis is the day of the quarter), and it displays both X- and Y-axis labels. When I open them on my system (Windows XP, Excel 2002 SP 2) they look fine. But the following day when I open the workbook the charts are now a little larger and are overlapping the axis labels...very annoying! Any idea why this is happening? The workb...

Creeping Oulook connectivity problems
Hey folks, Looking for help/ideas here. Smallish office, 25 users or so. Exchange 5.5 running on NT4 (we can't/won't deal with AD) on good hardware--dual 2 Ghz Xeon Dell with 4 GB of RAM, mirrored RAID for the OS RAID 5 for the mail store. We spam filter on our mail relay (in our DMZ) using spamassassin and a few other tools and use Trend Scanmail on the Exchange server to scan for viruses. Clients are all XP Pro SP2, Outlook 2002, firewall off (we have a Cisco PIX that we know better than some relatives), and our network is remarkably high performing and clean. Management is very goo...