Workbook cells will not display figure

Puggwash63

Board Regular
Joined
Jul 27, 2009
Messages
174
My worksheet when protected and Shared will not display figures into certain cells: I have R75, S75, T75, U75 cells merged. I have a button when clicked it will send a required figure to the merged cells, if not protected or Shared, it works perfectly. The button has a Macro to create the figure which is:::::::::Sub ConfirmTen4()
If Range("AA19").Value = "" Then
MsgBox "Select product", vbInformation
Else
Application.ScreenUpdating = False
Dim LastRow As Integer
Dim LastRow2 As Integer
LastRow = ActiveSheet.Range("Z10000").End(xlUp).Row
LastRow2 = ActiveSheet.Range("AD10000").End(xlUp).Row

ActiveSheet.Range("E4:H4").Copy
ActiveSheet.Cells(LastRow + 1, "Z").Select
ActiveSheet.Paste
ActiveSheet.Range("I4").Copy
ActiveSheet.Cells(LastRow + 1, "AD").Select
Selection.PasteSpecial Paste:=xlPasteValues:::::::::: Can you please tell me why the cells when Protected or Shared when the button is clicked do not merge and the figure is not visual and it creates a line on each cell:::::: Many thanks Pugg
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
No, you need to unprotect the sheet first !!
Maybe this
Code:
Sub ConfirmTen4()
Dim LastRow As Integer, LastRow2 As Integer
ActiveSheet.Unprotect
    If Range("AA19").Value = "" Then
        MsgBox "Select product", vbInformation
    End If
LastRow = Cells(Rows.Count, "Z").End(xlUp).Row
LastRow2 = Cells(Rows.Count, "AD").End(xlUp).Row
Range("E4:H4").Copy Destination:=Range("Z" & lr + 1)
ActiveSheet.Range("I4").Copy
Range("AD" & lr + 1).PasteSpecial Paste:=xlPasteValues
ActiveSheet.Protect
End Sub
 
Upvote 0
Try stepping through manually, and see which step doesn't work !!
 
Upvote 0
Would it be easier to forward the file so you can see the area I'm querying and let me know what action is needed

Pugg
 
Upvote 0
This is the code I have for the sheets so you can see the difference from what you sent me to replace to what is running if I do not protect the sheet or click the Share workbook button: Sub ConfirmTen4()Dim LastRow As Integer, LastRow2 As Integer
ActiveSheet.Unprotect
If Range("AA19").Value = "" Then
MsgBox "Select product", vbInformation
End If
LastRow = Cells(Rows.Count, "Z").End(xlUp).Row
LastRow2 = Cells(Rows.Count, "AD").End(xlUp).Row
Range("E4:H4").Copy Destination:=Range("Z" & lr + 1)
ActiveSheet.Range("I4").Copy
Range("AD" & lr + 1).PasteSpecial Paste:=xlPasteValues
ActiveSheet.Protect
End Sub
Sub ConfirmTen5()


If Range("AI19").Value = "" Then
MsgBox "Select product", vbInformation
Else
Application.ScreenUpdating = False


Dim LastRow As Integer
Dim LastRow2 As Integer


LastRow = ActiveSheet.Range("AH10000").End(xlUp).Row
LastRow2 = ActiveSheet.Range("AL10000").End(xlUp).Row




ActiveSheet.Range("E5:H5").Copy
ActiveSheet.Cells(LastRow + 1, "AH").Select
ActiveSheet.Paste


ActiveSheet.Range("I5").Copy
ActiveSheet.Cells(LastRow + 1, "AL").Select
Selection.PasteSpecial Paste:=xlPasteValues






Application.CutCopyMode = False



ActiveWorkbook.Save
Application.ScreenUpdating = True


End If
End Sub
 
Upvote 0
I note in your code you have a LastRow2, but it isn't used anywhere and I imagine it should be here
Code:
ActiveSheet.Range("I5").Copy
ActiveSheet.Cells(LastRow + 1, "AL").Select
Selection.PasteSpecial Paste:=xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top