using the range method

i want to select certain columns and rows and use this 
selection to create a chart.  The selection is in a loop 
and the cell locations will vary every time it is run.  
Here's my code:

Worksheets(1).Range(Cells(startRow, 16), Cells(endRow, 
18)).Select

where "startRow" and "endRow" are integers.  

I always get the error that "Method 'Cells' of 
object '_Global' failed"  Am I using the wrong format for 
the Range method?
thanks in advance
0
9/16/2003 7:48:47 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
563 Views

Similar Articles

[PageSpeed] 3

J.E. McGimpsey wrote:
 >or the much more efficient:
 >
 >    With Worksheets(1)
 >        .Range(.Cells(startRow, 16), .Cells(endRow, 18)).Select
 >    End With

One might also consider

     Set rng = Worksheets(1).Range("A1")
     Range(rng(startRow, 16), rng(endRow, 18)).Select

Alan Beban

0
beban (93)
9/16/2003 8:15:00 PM
Reply:

Similar Artilces:

sending mail using an alias email address
We are using Exchange Server 2007 with Outlook 2007 clients. I have several email addresses listed under my mail account on the Exchange Server for which I "receive" email. However, the server will not allow me to "send" email using any of these email addresses - as it only allows me to send using the primary address for my email account. I get a message saying "You are not allowed to send this message ... on behalf of another sender without permission to do so." What settings do I need to change on the Exchange Server so that it allows Outlook 2007 ...

using parameters
I have a form which the user selects the BlockNo. The other information that is entered in the form is : 1) NoOfRecordedTrees - RT 2)NoOfSurroundingTrees - ST When the BlockNo is entered, a query runs which picks up fertiliser rates for this Block for all sectors within that block. With RT and ST - it should do a calculation such that it uses Rate/ sector * (RT+ST) to find how much fertiliser is needed for each sector in each block. I would like to add a column to the existing query showing FertiliserAmt using these parameters. How do I specify them within the query. Thanks for your great...

how can i set up my pop and smtp account using proxy server in ou.
"Abhishek" <Abhishek@discussions.microsoft.com> wrote in message news:90EE645B-97D9-4145-A368-E26743C547F9@microsoft.com... You'll need instructions from your ISP. -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP Stockholm Consulting Group/KSG http://www.scgab.com Microsoft OneNote FAQ: http://home.hawaii.rr.com/schorr/computers/onenotefaq.htm **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! ...

Finding all queries which use a table
Hi, Does anyone know of a tool that can scan all queries in a database and find if a certain table is used? I have a table called tblCustomerRollup which is old and outdated. I want to see which of the 500 queries in my database use this table without opeing every single one of them? Thanks, -- Chuck W Chuck Sounds like a variation on Search/Replace. Try searching online for "Database Documenter" as a starting point. A couple of the commercial tools I've used include FMS, Inc.'s Total Access Analyzer and Black Moshannon's Speed Ferret. There are a lot of fr...

Re: Using alias address
Brian Tillman wrote: > Vince <vinresp*@swhome.com> wrote: > > >>We use an exchange server at work for e-mail. I have set up an alias >>that I use for receiving mail but I wanted to use the alias for >>sending all the mail as well. I was told that it cannot be done in >>exchange but I can use a POP server. > > > I don't believe that's always true. For example, I have several accounts in > Outlook where I work, all within the same profile. Only one of those > accounts, the Exchange account, uses my work address. The ot...

Can Outlook 2003 use MSN Messenger INSTEAD of Windows Messenger?
I didn't get an answer to this question last week so I'm re-posting... I recently purchased a new computer (Windows XP Home Edition w/SP2) and loaded up all of the available updates to the OS, Internet Explorer, etc. Next, I installed Office 2003 Professional. I disabled Messenger integration with Outlook 2003 as discussed in other posts here. Next I installed MSN Messenger 6.2 and it seemed to run properly as a stand-alone application. So I re-enabled Messenger integration on Outlook 2003. The next time I booted up and ran Outlook, the Messenger icon appeared in the taskbar...

Creating Contacts For Accounts Using...
Hopefully as Microsoft CRM matures, many small time saving features will be added. One that should be a priority is the ability to add a new contact for an existing account using the common account information, i.e. address, phone number, web address, etc. Retyping the same company address in each time is not very productive. Thank you, Ed Podowski ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, f...

Scroll horizontaly with mouse, create same system used to scroll .
Hi, I think it would be great if mouses adopted a second scroll button, for horizontal scrolling, just like the vertical one .... Indeed, when you work with wide Excel spreadsheets, you can easily scroll down but to scroll from left to right or vice-versa, you have to use the scroll bar or arrows and it's annoying... So, am I a millionnaire yet??? Hi Frederic, > I think it would be great if mouses adopted a second scroll button, for > horizontal scrolling, just like the vertical one .... Indeed, when you work > with wide Excel spreadsheets, you can easily scroll down b...

outlook in sub-domain to set use root-domain question!!!
Dear Sir Please see below more details,(We are using special railway line between Head office in Taipei and branch office in Tao-Yuan) Head office in Taipei: aaa.com(Root domain) Dc server * 2(One of it is GC Server), Front-End Exchange 2003 *1, Back-End Exchange 2003 * 2(One is named mail1, another is named mail2 ) Branch office in Tao-Yuan: bbb.aaa.com(sub-domain) Dc Server *1(No GC Server,No Exchange Server) After using ADMT v3 Tool, when I transfer an account from root named aaa.com(ou) to bbb.aaa.com. After I ins...

Outlook first use
Hi, when I open Outlook in a workstation for the first time, Outlook open setup and ask user to create a new profile. I have a utility to create profile automaticaly and this setup is deleting existing profile. Is it possible to Outlook don�t ask to create a new profile for the first time? Tks. Alex ...

Online Restore using NT Backup has no edb.chk or edb.log files
I have a single site with four servers running Exchange 5.5 SP4 on NT4 SP6a. I am using an internal 35/70 Compaq DLT. When I back up two servers at the same time using online method, I am missing the edb.log and and edb.chk files when trying to restore the db's. Is there a known issue for this? Thanks, Jim When you make online backup, you are backing up the database content perse, the logs files will be skipped because ntbackup cannot back up open files. I recomend you to adquire a third party backup software with open files and exchange database options, like Veritas to ensu...

Calculating Correlation using arrays
I have a sheet full of data for many products in chronological order. Column A is Date of manufacture Column B is time of manufacture Column C is the product Column D is a measurement from the automatic control system Column E contains occasional manual measurements for calibratio checks Up till now I have split the data out by grade and checked calibratio using pivot tables and also checked slope and offsets. After gainin exposure to all kinds of clever functions via this board I now wonde whether it would not be possible to automate these checks in some way ie on a separate sheet I list t...

can I use 11 x 14 paper in office documents?
Is it possible to use a larger sheet of paper when using publisher? Yes. First select the paper size in the Printer Setup. -- Don Vancouver, USA "Prairie Inn" <Prairie Inn@discussions.microsoft.com> wrote in message news:FC032907-D965-4DE9-891D-40DF9C6E9C8C@microsoft.com... > Is it possible to use a larger sheet of paper when using publisher? If your printer can handle it, yes. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "Prairie Inn" <Prairie Inn@discussions.microsoft.com> w...

Copy/paste range of rows between 2 dates...
Hi! I have a sheet called data which act as a database. The column A has the dates. In order to create customized chart in a userform, for different range of data(i.e from column D, G and M...), I'd like to select a range of rows that are between 2 dates and create the charts accordingly. Or copy to range to another sheet and then create the charts. I am not so advanced in VBA and any help would be greatly appreciated. Thanks! Greg ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Hi ...

use excel to create PP slides?
I'm not sure if this is possible but I have a list of information in an excel table and I'd like to auto matically generate a slide for each row of data. for instance, I have a list of products and each product is on it's own row with 6 product features in the following columns. How can I take that info from excel and create a features slide for each product using the information from the following columns. I don't mind cutting and pasting the list - it doesn't have to be fully automatic but as I have over 1000 products I desperately don't want to reype ...

Using BGInfo Command Line Parameters
I've read the Help file in BGInfo - but can't figure out how to use Command Line Parameters. When I click on my startup icon, I would like to invoke certain parameters. The line I came up with is: "C:\Program Files\BGInfo\BgInfo\Bginfo.exe /timer:99 /popup /taskbar /rtf:C:\DATA\BGINFO /nolicprompt" Obviously, this is wrong. My Target line reads: "C:\Program Files\BGInfo\BgInfo\Bginfo.exe" My Start in line reads: "C:\Program Files\BGInfo\BgInfo" Please help me by telling me what, exactly, should go in each line. I would also like t...

Altering the range that is plotted by a chart via VBA
Good morning all. I haven't really done a huge amount on charting, so I'm sure you'll think that these questions are a bit simplistic, but here goes! I plot a chart from a worksheet that contains three columns of data - the X axis contains week numbers, and is in B29:B54. Actual hours are entered in F29:F24 and cumualtive hours in G29:G24. The cumulative formula is of the form: =SUM($F$29:F29) So, each week, in order to plot another week's data, I have to copy this cumulative formula down by one cell, which, considering I have a lot of these reports, is a bit time cons...

Creating and pasting using VB
I need to create an email and paste a current selection in microsoft excel using visual basic. I have just started to work on this so I don't know what all I have to include. If I need mapi add-ins or anything else added please let me know. I already have the sub routines set to copy the data that I need out of excel but now I need to email this data automattically. Any help would be very helpful. Thanks, Matt ...

Use Your Brain
All, Here is an example of what extreme boredom can do to a person. Excel 2002 / Window XP :D Have fun. Attachment filename: use your brain.zip Download attachment: http://www.excelforum.com/attachment.php?postid=386422 --- Message posted from http://www.ExcelForum.com/ Ken, Very cute. You must have a lot of free time on your hands. John "Pyball" <Pyball.ynt5z@excelforum-nospam.com> wrote in message news:Pyball.ynt5z@excelforum-nospam.com... > All, > > Here is an example of what extreme boredom can do to a person. > > Excel 2002 ...

Can Entourage be used to access Google Groups
I am in the process of switching from PC to Mac. In Entourage, I see this news server. Can I get some of my newsgroups in Google Groups to show on Entourage or Mac Mail? Responses off group will be welcome if I have asked something everyone except me knows. Thanks, Michael Plog On 1/31/10 3:25 PM, Michael Plog wrote: > I am in the process of switching from PC to Mac. In Entourage, I see this > news server. Can I get some of my newsgroups in Google Groups to show on > Entourage or Mac Mail? > > Responses off group will be welcome if I have asked something e...

IEnumUnknown->Next method causes a crash in MFC 7.1 (VS .net 2003)
Hi, I have a couple of ActiveX controls inserted in my MFC (MFC 7.1) dialog along with 2 buttons. I used "EnumObjects" method on the ole container to enumerate the Embedded ole objects. I could get to the IUnknown pointers of the ole objects that i inserted in the dialog. But after returning IUnknown pointers for the activex controls (i inserted), the IEnumUnknown->Next method still tries return some uninitialized object and eventually causes a crash. I used the following piece of code to enumerate the objects in the ole container. hr = pOleObj->GetClientSite( &pCl...

Publish A Workbook Onto The Web, Then Access Using My Web Browser.
How do I access my spreadsheet, or workbook, on the web once I've saved it as a webpage from the file menu? I've found that even though I've save my workbook as a webpage, it does not have an http:// address which I can type in my web browser to access the workbook from my home computer or from a remote computer. Should I have to sign up with an http:// service provider or can this all be done from using Microsoft Office XP without going through a third-party? -- sigmad You have to have a website first of all, otherwise, where do you want to host this page? "sigmad&q...

Conditional formatting a date range
If I have a column of dates that are manual entered what is the formula to conditionally format them based on a date range of three months before the current date to the current date and another three months after the current date to the current date? Assume the dates are in column A, starting with A1. Highlight all the dates, with A1 as the active cell, and click on Format | Conditional Formatting. In the dialogue box you should select Formula Is rather than Cell Value Is and then enter this formula: =3DAND(A1>=3DTODAY()-91,A1<=3DTODAY()) Click on the Format button and choose the ...

Want to modify this procedure to have a range of periods rather than a single period
This is a multi-part message in MIME format. ------=_NextPart_000_00BF_01CB206B.89E3AC60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have the procedure below I want simply modify the periods procedure below to be -- perpost >=3D = '201001' and <=3D '201012' so I want a range of periods rather than a = single period as in the example below I would really appreciate it if someone can help me out on this. Thanks=20 Sammy USE DEMOAPP Declare @perpost nvarchar(8) /* Do not edit Above=20 ...

What are the different methods of representing numerical data?
Can someone answer my questions "What are the different methods of representing numerical data"? "Excel Problem" wrote: > Can someone answer my questions "What are the > different methods of representing numerical data"? Sounds like a test question. What's the context? Is it asking about numerical formats? Or is it asking about date v. time v. other numerical data? (Which really is not "different methods" per se. All are floating-point aka real numbers. But the test might be asking for the specifics of date and time rep...