Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Excel XP, Win XP
I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
try this instead of copy/paste
sheets("destinationsheet").range("d2:f3").value= sheets("sourcesheet1").range("a1:c2").value= note that the ranges need not be identical but they must be the same size. -- Don Guillett SalesAid Software "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Because you told Excel not to. (xlPasteValues) use xlPasteAll to get
the borders. Die_Another_Day Otto Moehrbach wrote: Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Don
I'll try that and let you know. But in the meantime, how do I get the grid lines back? Remember that grid lines are gone for only the destination cells, not the whole sheet. Thanks for your time. Otto "Don Guillett" wrote in message ... try this instead of copy/paste sheets("destinationsheet").range("d2:f3").value= sheets("sourcesheet1").range("a1:c2").value= note that the ranges need not be identical but they must be the same size. -- Don Guillett SalesAid Software "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Thanks for the help but I think you misunderstood me. I want to copy only
the values, so I used the "xlPasteValues". This didn't copy the borders and that's what I wanted. But now the grid lines around the destination cells are gone. Not the borders but the normal sheet grid lines. Thanks again. Otto "Die_Another_Day" wrote in message ups.com... Because you told Excel not to. (xlPasteValues) use xlPasteAll to get the borders. Die_Another_Day Otto Moehrbach wrote: Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Don
I tried a slight variation of what you said to match what I have. The line of code is now: Dest.Offset(cc).Value = j.Value I changed the destination to a group of cells that I knew had grid lines. Now those grid lines are gone as well. Any ideas? Thanks for your time. Otto "Don Guillett" wrote in message ... try this instead of copy/paste sheets("destinationsheet").range("d2:f3").value= sheets("sourcesheet1").range("a1:c2").value= note that the ranges need not be identical but they must be the same size. -- Don Guillett SalesAid Software "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
If the copied cell's interior format has a pattern (eg Solid) when you paste
you will lose gridlines to cell neighbours. It might not be obvious if the copied cell's interior colour is white or xlAutomatic. Borders may or may not get pasted, depends where the borders were originally applied. Eg bottom border applied to A1, copy & paste A2 no top border in the destination, and no top gridline if say Solid. Regards, Peter T "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Don
I get the same thing you do with any of my files, old and new. The problem is that the grid lines disappear on the OP's file. And not in all cells. Just cells in a certain group of rows. He built his file on a MAC. I know you feel the same as I do; frustrated. I think I will try deleting all the rows in this group of rows. In fact, I'll delete all the rows from the start of this group of rows down to the bottom. Thanks for your time. Otto "Don Guillett" wrote in message ... d5 with borders d6 standard grid lines stayed intact Range("d6").Value = Range("d5").Value just tested and it did NOT copy the borders or delete the normal grid lines -- Don Guillett SalesAid Software "Otto Moehrbach" wrote in message ... Don I tried a slight variation of what you said to match what I have. The line of code is now: Dest.Offset(cc).Value = j.Value I changed the destination to a group of cells that I knew had grid lines. Now those grid lines are gone as well. Any ideas? Thanks for your time. Otto "Don Guillett" wrote in message ... try this instead of copy/paste sheets("destinationsheet").range("d2:f3").value= sheets("sourcesheet1").range("a1:c2").value= note that the ranges need not be identical but they must be the same size. -- Don Guillett SalesAid Software "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Peter
Bingo!!! You are spot on! Every cell I was copying had a while pattern. The OP did this to get a specific appearance. I will tell him how to do that without the white pattern. Thanks for your time. Otto "Peter T" <peter_t@discussions wrote in message ... If the copied cell's interior format has a pattern (eg Solid) when you paste you will lose gridlines to cell neighbours. It might not be obvious if the copied cell's interior colour is white or xlAutomatic. Borders may or may not get pasted, depends where the borders were originally applied. Eg bottom border applied to A1, copy & paste A2 no top border in the destination, and no top gridline if say Solid. Regards, Peter T "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disappearing grid lines
Change "while" to "white". One of these days I'm going to learn how to
spell. Otto "Otto Moehrbach" wrote in message ... Peter Bingo!!! You are spot on! Every cell I was copying had a while pattern. The OP did this to get a specific appearance. I will tell him how to do that without the white pattern. Thanks for your time. Otto "Peter T" <peter_t@discussions wrote in message ... If the copied cell's interior format has a pattern (eg Solid) when you paste you will lose gridlines to cell neighbours. It might not be obvious if the copied cell's interior colour is white or xlAutomatic. Borders may or may not get pasted, depends where the borders were originally applied. Eg bottom border applied to A1, copy & paste A2 no top border in the destination, and no top gridline if say Solid. Regards, Peter T "Otto Moehrbach" wrote in message ... Excel XP, Win XP I am copying a series of cells in a For loop and pasting them somewhere else. The destination cells have the normal grid lines and no borders. The source cells have borders around each cell. I am using the following code: j.Copy Dest.Offset(cc).PasteSpecial xlPasteValues After pasting, the destination cells have no grid lines. Why? And how do I get the grid lines back? Thanks for your time. Otto PS: I am helping an OP with this file that he built. He has a MAC and I have a PC. Could this be a factor? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Grid Lines | Excel Discussion (Misc queries) | |||
Grid lines in Excel not showing.Have tools,options,view/grid cked | Excel Discussion (Misc queries) | |||
Trend lines disappearing... | Charts and Charting in Excel | |||
printing grid lines when grid lines is checked | Setting up and Configuration of Excel | |||
Grid Lines | Charts and Charting in Excel |