From VBA: How to select a column by column number instead of letter?

I'm in MS Access and don't know from column letters - all my constants are in
terms of column number.

I'd like to select, say, column number 7 and hide it....

?
-- 
PeteCresswell
0
Pete
2/4/2005 2:21:04 PM
excel 39879 articles. 2 followers. Follow

3 Replies
391 Views

Similar Articles

[PageSpeed] 12

in a macro
columns(7).hidden=true

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"(Pete Cresswell)" <x@y.z> wrote in message
news:i117011tjd8g1bimpn0dmk2oc1e901bbvn@4ax.com...
> I'm in MS Access and don't know from column letters - all my constants are
in
> terms of column number.
>
> I'd like to select, say, column number 7 and hide it....
>
> ?
> -- 
> PeteCresswell


0
Don
2/4/2005 3:09:31 PM
Pete

Columns(7).EntireColumn.Hidden = True


Gord Dibben Excel MVP

On Fri, 04 Feb 2005 14:21:04 GMT, "(Pete Cresswell)" <x@y.z> wrote:

>I'm in MS Access and don't know from column letters - all my constants are in
>terms of column number.
>
>I'd like to select, say, column number 7 and hide it....
>
>?

0
Gord
2/4/2005 4:58:26 PM
Per Gord Dibben:
>Pete
>
>Columns(7).EntireColumn.Hidden = True

Thanks Gord, thanks Don...
I was trying 
..Columns(7).Select
..Selection.Hidden=True.
-- 
PeteCresswell
0
Pete
2/4/2005 9:34:11 PM
Reply:

Similar Artilces:

Limiting number of duplicate records
I'm trying to use If and DCount in my form to give me a message when a user tries to create more than the allowed number of duplicate records. The number of duplicates allowed is established in the table tblFloorProgCriteria. These are the three fields where I’m looking for duplicates: AuditID (Number Field) FloorProgCriteriaID (Number Field) AuditorID (Text Field) Here’s what I have so far... Private Sub Form_BeforeUpdate(Cancel As Integer) If DCount("*", "tblFloorProgAudit", "[AuditID] = " & Me.[Audi...

BROWSEINFO: set (pre)selected path
Hi together, in C++.net I can do the following in a FolderBrowserDialog for the user to change f.e. the workPath for an application: FolderBrowserDialog* di=new FolderBrowserDialog(); di->RootFolder = Environment::SpecialFolder::Desktop; di->SelectedPath=workPath; In an MFC project I can do the following: BROWSEINFO bi; bi.pidlRoot = NULL; // set root to user's desktop But I did not find any possibily to pre(select) the old workPath in then structure: typedef struct _browseinfo { HWND hwndOwner; LPCITEMIDLIST pidlRoot; LPTSTR pszDisplayName; LPCTSTR lpszTi...

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

Changing Rows to Columns
Is it possible to easily rotate a spreadsheet or part of a spreadshet, to change the data in rows to columns? Do to a sorting problem in the charts I create, it seems I have to sort the data in the spreadsheet first. Any help would be appreciated. Hi, Sure is a way. select & copy your data. then select the cell where you want to re-paste; right-click and select paste special; in the dialog box check "transpose". Ok. jeff >-----Original Message----- >Is it possible to easily rotate a spreadsheet or part of a >spreadshet, to change the data in rows to columns? D...

Total number of items in a sale should be displayed in POS screen
Before you tender a sale it is always a good idea to compare the number of items the customer is purchasing to the number of items rung in. If your customer is buying 10 items and only 9 have been entered, you want your salespeople to know this. RMS does not display the total number of items in a sale anywhere in the POS screen so verifying that all items have been entered is difficult and therefore not done. ---------------- 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&qu...

RMA and serial number tracking
We are using GP 9.0 Has anyone else seen where you create a crosship RMA for a serial tracked item, then receive, close and post the invoice -- and the serial for the failed part that you recieved back into a new inventory site, is still showing up as an equipment item for the customer. Further, the serial # you sent out as a replacement does not show up anywhere in the customer's equipment list. It does not even do the "serial # supersession" within the failed part's record. How are you supposed to accurately track what a customer has returned and what you sent t...

RE: Yes/No select All or select None
I have a form (continuous) where the user sees a list of all people with a yes/no checkbox beside the name. They can scroll down the list and select individuals by clicking on the Yes/No checkbox. I would like to add a button that allows the user to select all or to unselect all (select none). Any thoughts on how to accomplish this? Thank you, Kelvin Execute an Update query to set the field to Yes or No for all records. Here's the kind of code you would put into the Event Procedure for the Click event of your command button: Dim strWhere As String 'Save any changes...

My selections are locked--how do I unlock them?
I'm using Microsoft Office Home and Student 2007 and the bottom of my page says that my selections are locked. This happens when I try to do anything. The only thing I can do is open a document, but it won't let me type or copy or anything like that. Also, little paragraph symbols have appeared all over my page. Is it a trial copy that has expired? If so, time to buy. Is it a retail copy that hasn't been actived? "ChikiMongo" <ChikiMongo@discussions.microsoft.com> wrote in message news:B791BF17-B602-4297-9AED-FB3FF4F976D9@microsoft.com... : I'm...

Stacked column chart (I suppose)
Hello I have the following data: Your Benchmark group company minimum median maximum 587332 47609 271686 406557 638592 923238 I want to have 0 at the top of the x-axis and 1,000,000 at the bottom. If I set up a stacked column chart of the Benchmark group data (47609, 271686, 406557, 638592, 923238) how can I indicate the value for "Your company". Hans Knudsen Hans Knudsen wrote: > I have the following data: > > Your ...

Last Number in a column to that is not equal to zero
I have an inventory worksheet that I am having trouble with. The total daily inventory column updates daily. At the end of the column, I want a formula that gives the most recent inventory number. For instance 1 15,358 2 15,358 3 19,520 4 19,520 5 19,693 6 0 7 0 8 0 9 0 10 0 11 0 The final field in the inventory column would read 19693. There will always be a whole number for inventory, so the zeros will be replace with the number once the daily inventory is completed. one thing you can try. If you have a header row add +1 =COUNTIF(A:A,">0") -- Don Guillett SalesAid Softw...

easiest way to parse column and row info?
I'm trying to set up a macro to function on a user-selected range (rather than hardcoding row/column references, or having a bunch of inputboxes to collect the reference info) Getting the range is easy; Dim TempRange as Range Set TempRange = Selection debug.print TempRange.Address(False, False) which gives me (in my test scenario): B6:AD1463 My macro will need to process each column independently, and for each column, I will loop through each row and perform some actions. I can use left/right/mid to pull apart B6:D14 into the component pieces (B..AD and 6..1463) bu...

Jump to the item in a list as the first letter is pressed
I have couple of large lists with alphabetised data. Is it possible to have intellisense, like if P is pressed on the keyboard, it should jump to P, if H then jump to first name with H as the first letter, like that. It does not happen with the lists I have(by default)?Is this possible? Thnx Here is one way you could try, but it will go there and filter at th same time (you may or may not want it) :shock: If your list is in contiguous rows and columns, meaning no blank rows no blank columns, then setup autofilter. The dropdown list accept first letter Autofilter is setup using toolbar&...

auto number
I was wondering how to go about setting up a work sheet to so as soon as I click in the first row that I will be adding data it would automaticly mark that row Number 1 and when I enter new data in the second row it automatically puts in 2, and so on? Thanks -- Eddie Hi Eddie - Try this: (Excel 2003) You don;'t give much info about how your spreadsheet is set up so try this: Let's assume you have all of your field names in the first row and the A col will hold the auto number. 1. In a2 type: =cell("row",a2) 2. Select Data from the menu 3. Select Form from the dro...

VBA and Scheduled task in Outlook
Hi, how can I: a) pull the query from somewhere and send it by e-mail automatically. E.g. I want to take a temperature table from http://www.wunderground.com/history/airport/EHAM/2009/7/10/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA where 2009/7/10 is the date of yesterday put it into an e-mail and send it automatically each day at 8 o'clock? b) if this is not possible, how can I send an e-mail with the attachment c:\Documents\query20090710.xls each day at 8 o'clock? my boss wants this automatized, I know how to write the VBA code for Excel, but don'...

Print, Merged Cells, and VBA
Hello I'm looking for a code that will help me with a print job for a worksheet. There are a lot of merged cells and a lot of "IF"s to be used in the VBA for range selection. Thanks in advance, Sarr ...

Colour Grouping of Columns
Excel 97 Is there a way to colour the columns in a chart depending on their numerical range. For example: Say we have a series of values from 0 through 100 represented in the column chart. I would like 0-25 to be one colour, 26-50 to be another, etc etc. Is this possible? Any advice gratefully appreciated. WSF WSF, Yes, you can do so by setting up various ranges with IF statements and multiple culumns. Please see Jon Peltier's discussions on conditional charting: http://www.peltiertech.com/Excel/Charts/ConditionalChart1.html http://www.peltiertech.com/Excel/Charts/ConditionalC...

Add sequences of positive then negative numbers
I have a long list of random positive and negative numbers in column A. Id like to be able to add sequences of positive then negative numbers as they occur. For example... in the list 5,-1,-5,-3,2,8,-1,-3,9,7,5,11,-5,6,5 ... i would add the positive numbers until the next number in the list was negative, then add the negative numbers till the next number was positive, etc. The answers for the above list would be 5, -9, 10 , -4, 21, -5, 11 Any ideas ? -- judoist ------------------------------------------------------------------------ judoist's Profile: http://www.excelforum.com/mem...

Use VBA to update Access table or Query from Excel
Can I use VBA to update Access table or Query from Excel? Thanks in advance Hi Leungkong, > Can I use VBA to update Access table or Query from Excel? Of course, using ADO or DAO. See: http://www.erlandsendata.no/english/index.php?d=envbadacexportado Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Hi Jan, Thanks. I think ADO is what I want. But I am not only want to export from excel to access. I want to edit some data in access table. For example, Access has a table "ProductList" I want to use Excel to call the product by "Pro...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

Column width and pasting sections in excel? Formatting questions
I am trying to make a spreadsheet in which I need to have varied column widths in different sections, one under another. (they don't need to relate directly, and no major equations going on) for example: xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxx|xxxxx|xxxxxx xxxxxxx|xxxxx|xxxxxx How do I go about splitting the sheet or whatever I need to do so I can manipulate columns differently based on the row I'm in? Thanks! Rich Column widths apply to the whole column. You may be able to use merged cells to give the appearance that you want, but I try to stay...

vba select field
Hi, having a button on a form, is it possible to select only some fields (all from the same table) of the current record instead of all fields? I've tried this code: RunCommand acCmdSelectRecord RunCommand acCmdCopy Forse dipende dei dati nel record. but it selects ALL fields in the form. Thank you. Remigio hi, On 10.04.2010 18:01, remigio wrote: > having a button on a form, is it possible to select only some fields > (all from the same table) of the current record instead of all fields? > I've tried this code: > > RunCommand acCmdSelectRecord &...

Excel VBA/Macro programming for beginners
Hi all, I know a bit VB 6.0 programming. Will it help me to write exce vba/macro(same thing?).can anybody help me by providing some fre websites where i can have informations/codes for VBA/macro. Please tell me how could i make a *command Button * in a cell in th excel sheet -- sdebu_200 ----------------------------------------------------------------------- sdebu_2000's Profile: http://www.officehelp.in/member.php?userid=430 View this thread: http://www.officehelp.in/showthread.php?t=118812 Posted from - http://www.officehelp.i Try David McRitchie's "getting started with mac...

Revision conversion to a number suggestions ?
I have a problem with Revisioning conversions. I wonder if any one has any ideas on how to do this better. One of the elements in my database is drawing numbers and their Revision letter. ie drawing GA123 Revision A . the next drawing would be GA123 B and so on. My problem is when the drawing rolls all the way to GA123 AA or Even 3 Letters in the revision ie Rev ABZ. Currently i take the asc value of each letter and add them togeter to get a number representing the revision. example Rev AB would be 65+66 = 131 so when i compair drawings to see if a new one exists i can just...

Number Format #10
Hello I've got a large spreadsheet which was imported. Apart from the first 2 columns, the rows consist of number which I need to filter, but this isn't working. Then I noticed an apostrophe before each number in every cell, which doesn't show in the cell but up in the formula/text bar. I've set all the columns to numbers but the apostrophe won't go away. Please can someone tell me how I can without having to go into each cell as there are hundreds. Thank you J Select all the columns with these "numbers" in them, then right click the tab at the bottom of t...

Add a set number to a random entered number
I have to start a vehicle service record and am trying to add the 6000 mile service interval to the mileage at service number. EG. A B C D 1 6000 12000 2 12125 18125 3 18200 24200 etc A is the mileage at service and C is the next service due.I am trying to do this without having a cell with a line of 6000 in it and the formula eg =SUM(A1:B1) in the C cell.Is this possable?Hope some one can help. Hi =A1+6000 HTH. Best wishes Harald "Cyclops" <Cyclops@discussions.microsoft.com> skre...