$$Excel-Macros$$ PasteSpecial
Hi, This is driving me crazy, can someone help! I have a nice pretty worksheet, all coloured in and stuff - all I want to do is select all the cells and copy - then paste into a new workbook. I can do all of this, but it seems when using pastespecial I have to select values (because these cells have formulae in that I don't want to copy) at which point I lose the cell formatting. I have tried xlPasteValuesAndNumberFormats and pretty much every option I can see. There 'must' be a way - surely?! PS I am working in 2010 but it has to be backwards compatible down to 02 -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Re: $$Excel-Macros$$ Import data from notepad to excel
what happens if you just rename the .txt file to .csv and open in Excel... -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
$$Excel-Macros$$ Re: copy selected range to target with params
Hi, Do you have any code so far that I can help you with or are you starting from scratch? -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
$$Excel-Macros$$ Re: PasteSpecial
don't worry, I worked it out using 2 lines of code, pastespecial values then formats - would be nice to do it in one but I'm not that fussed... For some reason I had convinced myself doing it a second time would wipe out the number -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Re: $$Excel-Macros$$ PasteSpecial
thanks - it's a long story but basically I'm trying to export some sheets from a workbook with loads of code behind it. I wanted to use move/copy originally but it takes the vba behind the sheets with it. (Which I don't want). So I wrote a function that just deleted all vba code in the workbook - but then I ran into Excel 2010 issues having to tick the VBA project security box to let that run. The guy I am working for won't want to tell all his users they have to tick that... and I was worried about backwards compatibility too, so I decided to go for the easier option of copying the cells rather than the sheet. It's working now, not particularly quick but I think it's quick enough!! Thanks for your help -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
$$Excel-Macros$$ Excel VBA/ Access
Hi, I have posted this on the access group too, it can't really be classified as one or the other, but it's driving me mad, can anyone help. I have an Access 2010 database, which I have saved as .mdb. (ie not accdb) It has an update query in, which takes 2 string parameters. When I run it from Access it works fine - asks me for the 2 parameters then updates the table accordingly. However, I am trying to run it from Excel VBA. At first I thought the issue was the parameters, so I created another update query which takes 0 parameters. The continual error I get is 'Operation must use an updateable query'. It goes without saying that I can connect to the database, and I can run normal Select statements - anyone got any ideas? Code below: (obviously the execute line is the one that gives the error). Function RunUpdateQuery(objConn As ADODB.Connection) Dim objCommand As ADODB.Command Set objCommand = New ADODB.Command With objCommand .ActiveConnection = objConn .CommandType = adCmdStoredProc .CommandText = "qryTest" .Execute End With End Function -- -- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel