PDA

View Full Version : error in displaying value on a cover page



Mr_Mod
03-14-2013, 03:15 AM
I am using the following code to dispaly contents on a cover page of a large workbook to display the contents of a value in cell G6 in each of the work sheets

Me.Cells(l, 8) = wSheet.Range("G6").

Cell G6 contains a value similar to this 01020000000000000083, what i want to be able to do is just display the value of the 3rd to 6th character on the cover page.
I have tried to include tis code but it does not work.

Me.Cells(l, 8) = wSheet.Range("mid(G6,3,4)").

Would someone be able to advise how i would correct this so it will display correctly.

p45cal
03-14-2013, 07:26 AM
Cells(l, 8) = mid(wSheet.Range("G6").value,3,4)