Sorry.., I wasn't paying close enough attention when I was fitting the
post to avoid word wrap! Revise the code as follows...
Sub EditHiddenWkb()
Dim wks As Worksheet, wkb As Workbook
Dim vAns As Variant, sMsg As String
Set wkb = Workbooks("my.csv"): Set wks = wkb.Sheets(1)
With wkb
'Get the position to insert a new row,
'and the label of the column to delete.
sMsg = "Enter the row number position to insert the new row AND " _
& "the label of the column to delete, separated by a comma." _
& vbCrLf & vbCrLf & "Example: 2,B "
vAns = InputBox(sMsg)
If vAns = False Then Exit Sub '//user cancels
'Insert row and delete column
vAns = Split(vAns, ",")
With wks
.Rows(vAns(0)).Insert shift:=xlDown: .Columns(vAns(1)).Delete
End With 'wks
'Confirm success
Windows(wkb.Name).Visible = True
sMsg = "Do you want to save the changes to " & wkb.Name & " ?"
vAns = MsgBox(sMsg, vbYesNo)
Windows(wkb.Name).Visible = False
If vAns = vbYes Then .Save Else .Saved = True
End With 'wkb
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion