VBA write macro change column with 3 number digits to 4 digits the

-- 
James 
0
Utf
1/25/2010 1:51:01 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
1941 Views

Similar Articles

[PageSpeed] 55

Do you mean

Sub Macro()
Range("D1:D10").NumberFormat = "0000"
End Sub

-- 
Jacob


"James C" wrote:

> 
> -- 
> James 
0
Utf
1/25/2010 1:58:01 PM
Use the white space (here) to record details of your requirements -
don't try to put it all in the message header.

Pete

On Jan 25, 1:51=A0pm, James C <Jam...@discussions.microsoft.com> wrote:
> --
> James

0
Pete_UK
1/25/2010 1:59:11 PM
Thanks for your response
-- 
James 


"Jacob Skaria" wrote:

> Do you mean
> 
> Sub Macro()
> Range("D1:D10").NumberFormat = "0000"
> End Sub
> 
> -- 
> Jacob
> 
> 
> "James C" wrote:
> 
> > 
> > -- 
> > James 
0
Utf
1/25/2010 3:12:01 PM
Reply:

Similar Artilces:

How to write XML to the rendered HTML page.
In code behind, I generate a string that I would like to have rendered to my page so that my javascript can load it into a client side javascript xml document. If I use repsonse.write(txml), it puts it outside of the body of the document. I also tried assigning it to a label.text, but the javascript can not find it inside the span tag. Is there a way to do it? Thanks in advance. txml = "<xml ID='oPriceBookDrops'>" txml = txml & "<PBInfo>" txml = txml & "<DataPoint>" txml = txml & "<Product ProductName='Scre...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

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...

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 ...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Quote Number
I would like for users to go into a form and reserve a quote number. Would like the quote number to be auto-assigned using mmddyy (then count 01 to xx for the day) followed by their initials. Basically result would be 02280801TR for the first then 02280802TR etc....Not mandatory for the Initials if you could solve the autonumber mixed date field...Initials could be another field in the database and could combine later. Thanks Tony, I would place the below on the AddNew button: DoCmd.GoToRecord , , acNewRec Me.txtQuoteID = StrReverse(Format(Date, "mm")) & Format(Date, &quo...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

POS Receipt format change
I would like to have the "Sales Receipt" read "Sales Invoice" or "Invoice". Also I would like to have "Transaction #" replaced with "Invoice #". Can anyone help me with this? I have been able to edit the "Sales Receipt" portion in an xml editor but have not been able to change the "Transaction #" as there must be some other coding that needs to change. Thank you in advance. Robert Hi Robert, you can find the SUB: PrintTransactionType and then locate the Transaction.ReceiptReferenceNumberCaption reference field. this...

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 ...

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...

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...

Some macro help with shelling out to other program
We are using VNC in house to do remote control between workstations. As there are over 25 of them, I would like to set up a little macro in Excel (2003) that when run, displays a list of user names along with a box prompting for which # on the list you want to connect to. Here's what I have so far: ---- Sub RunVNC() Shell ("c:\program files\hyena\vncviewer.exe sv-ws6") End Sub ---- I would like to see something like: 1. Payroll 2. Receivables 3. Accountant 4. Reception Please enter the number to connect to: Typing 1 and pressing ENTER would run the Shell command abov...

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'...

Footer Macro?
Hi Months ago I read a Public Sub Macro that read the selection of a drop down list in a combo box and placed it in the center Footer at the same time it also placed the date in the right Footer and tme in the left footer. I have searched most of the regular sites including this one and cannot find it anywhere --- Can anyone help with my search. Any help much appreciated Cheers ---- Mully ...

Using CListCtrl #3
Does application get any notification message, when List Item is losing Selection? I need to apply some checks and want to prevent deselection in some cases? ...

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 &...

conversions #3
I want to convert a Works data base file to Excell or Quatro Pro. Is there a conversion file that will do it? Ross Hood "ross hood" <rosshood@shaw.ca> wrote in news:e47d01c3f01c$d056b600 $a501280a@phx.gbl: > I want to convert a Works data base file to Excell or > Quatro Pro. Is there a conversion file that will do it? Do you still have Works? If so, export the file to a format that is universal, like CSV, SYLK, tab-delimited, then import into Excel or Quatro. -- My email address has an extra @ (spell it out) and an extra invalid. Please remove them if you a...

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...

I can't change fonts. Why??
Hello! I have a strange problem, with Publisher. I only can use some basic fonts in textboxes. If I choose one (for example Jokerman), the font bar jumps back to Times or to other basic fonts. I have this problem on Vista-Office2007 Beta 2, XP SP2-Office 2003, XP SP2-Office 2000 too. What is interesting, that I can use all of them in the Wordart. In Word I can use all of the fonts too. What could be the matter? Could you help me? Thanks, Gábor from Hungary. ...

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...

Unable to Open received PO (change to "change order")
Great Plains will not allow me to change this Purchase Order from Received to Change Order: Here is the message I get: However, if I try to enter a quantity cancelled, I get: How can I re-open this Purchase Order so I can change the price??? Thank you. Unfortunately, the pasted messages did not come through. Once a line item is received, you can change its cost only during invoice matching. The process would be to return the item; add a new row with the correct cost; and receive and invoice the new item. Not an elegant solution, for sure. -- Charles Allen, MVP &quo...

Turn pc speaker on/off with vba code
Is this possible? Thanks I found something here on how to do it withVBScript. You can probably modify it to work in VBA http://www.pcreview.co.uk/forums/thread-1468591.php -- HTH, Barb Reinhardt "David" wrote: > Is this possible? > Thanks Thanks Barb I'll have a go (I need to improve my web searching skills) "Barb Reinhardt" wrote: > I found something here on how to do it withVBScript. You can probably modify > it to work in VBA > > http://www.pcreview.co.uk/forums/thread-1468591.php > -- > HTH, > ...

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...

get change operation on coCustomLinks cannot find table
Hello, I have this client that has deployed their server in Singapore but has a branch in Thailand. Since Thailand also needs to use Great Plains, they have installed a GP 8.0 application in a workstation in Thailand and connects to the database deployed in Singapore. But when the staff in thailand logs onto her workstation, she gets the error "get/change first operation on coCustomLinks cannot find table" then all suceeding document processing (i.e. GL entries), go haywire - the next journal entry number doesn't generate. They went through the same installation procedures ...

Number of categories
I need to make a macro to change the between tick-mark labels with a value depending of the total numbers of rows, but I do not now the VB code to put the number of categories in the graph. I'm not a expert in VB coding, any help is appreciated, Thanks, jos post specifics "Jos" wrote: > I need to make a macro to change the between tick-mark labels with a value > depending of the total numbers of rows, but I do not now the VB code to put > the number of categories in the graph. > I'm not a expert in VB coding, any help is appreciated, > Thanks, jos ...